diff --git a/apps/marketing/src/components/(marketing)/carousel.tsx b/apps/marketing/src/components/(marketing)/carousel.tsx index 61ff9a30d..d2c6486fb 100644 --- a/apps/marketing/src/components/(marketing)/carousel.tsx +++ b/apps/marketing/src/components/(marketing)/carousel.tsx @@ -9,11 +9,56 @@ import { Card } from '@documenso/ui/primitives/card'; import { Thumb } from './thumb'; -type PropType = { - slides: { label: string; imageSrc: string }[]; +type SlideType = { + label: string; + imageSrc: string; + type: 'image' | 'video'; }; -export const EmblaCarousel: React.FC = ({ slides }) => { +type CarouselPropType = { + slides: SlideType[]; +}; + +const SLIDES = [ + { + label: 'Signing Process', + type: 'video', + src: '/signing.mp4', + }, + { + label: 'Templates/Fields', + type: 'video', + src: '/signing.mp4', + }, + { + label: 'Zapier', + type: 'video', + src: '/signing.mp4', + }, + { + label: 'Webhooks', + type: 'video', + src: '/signing.mp4', + }, + { + label: 'API', + type: 'video', + src: '/signing.mp4', + }, + { + label: 'Teams', + type: 'video', + src: '/signing.mp4', + }, + { + label: 'Profile', + type: 'video', + src: '/signing.mp4', + }, +]; + +export const Carousel = () => { + const slides = SLIDES; const [_isPlaying, setIsPlaying] = useState(false); const [selectedIndex, setSelectedIndex] = useState(0); const [emblaRef, emblaApi] = useEmblaCarousel({ loop: true }, [ @@ -100,15 +145,17 @@ export const EmblaCarousel: React.FC = ({ slides }) => {
{slides.map((slide, index) => (
- + {slide.type === 'video' && ( + + )}
))}
diff --git a/apps/marketing/src/components/(marketing)/hero.tsx b/apps/marketing/src/components/(marketing)/hero.tsx index b7a8377d6..e678ba6a5 100644 --- a/apps/marketing/src/components/(marketing)/hero.tsx +++ b/apps/marketing/src/components/(marketing)/hero.tsx @@ -14,39 +14,7 @@ import { useFeatureFlags } from '@documenso/lib/client-only/providers/feature-fl import { cn } from '@documenso/ui/lib/utils'; import { Button } from '@documenso/ui/primitives/button'; -import { EmblaCarousel } from './carousel'; -import './embla.css'; - -const SLIDES = [ - { - label: 'Signing Process', - imageSrc: 'https://documenso.com/images/hero/hero-1.png', - }, - { - label: 'Templates/Fields', - imageSrc: 'https://documenso.com/images/hero/hero-1.png', - }, - { - label: 'Zapier', - imageSrc: 'https://documenso.com/images/hero/hero-1.png', - }, - { - label: 'Webhooks', - imageSrc: 'https://documenso.com/images/hero/hero-1.png', - }, - { - label: 'API', - imageSrc: 'https://documenso.com/images/hero/hero-1.png', - }, - { - label: 'Teams', - imageSrc: 'https://documenso.com/images/hero/hero-1.png', - }, - { - label: 'Profile', - imageSrc: 'https://documenso.com/images/hero/hero-1.png', - }, -]; +import { Carousel } from './carousel'; export type HeroProps = { className?: string; @@ -221,7 +189,7 @@ export const Hero = ({ className, ...props }: HeroProps) => { initial="initial" animate="animate" > - +