Skip to content

Commit

Permalink
feat(volcamp): adding zod schema for Volcamp showcases (#1144)
Browse files Browse the repository at this point in the history
  • Loading branch information
CruuzAzul authored Aug 22, 2024
1 parent 55dcb18 commit b7e2300
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions remotion/compositions/showcases/showcases.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,23 @@ const SpeakerSchema = z.object({
picture: z.string(),
});

const SpeakerVolcampSchema = SpeakerSchema.extend({
company: z.string(),
});

export const ShowcaseSchema = z.object({
title: z.string(),
speakers: z.array(SpeakerSchema),
date: z.string(),
time: z.string(),
location: z.string(),
});

export const ShowcaseVolcampSchema = z.object({
themeName: z.string(),
title: z.string(),
speakers: z.array(SpeakerVolcampSchema),
date: z.string(),
time: z.string(),
location: z.string(),
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import {Composition, Folder} from 'remotion';

import {ShowcaseVolcampSchema} from '../showcases.types';

import {Volcamp} from './Volcamp';

export const VolcampComposition = () => {
Expand All @@ -12,6 +14,7 @@ export const VolcampComposition = () => {
fps={30}
durationInFrames={300}
component={Volcamp}
schema={ShowcaseVolcampSchema}
defaultProps={{
themeName: 'Web & Mobile',
title:
Expand Down

0 comments on commit b7e2300

Please sign in to comment.