'use client'; import Image from 'next/image'; import Link from 'next/link'; import { Trans } from '@lingui/macro'; import type { Variants } from 'framer-motion'; import { motion } from 'framer-motion'; import { usePlausible } from 'next-plausible'; import { LuGithub } from 'react-icons/lu'; import { match } from 'ts-pattern'; import backgroundPattern from '@documenso/assets/images/background-pattern.png'; import { useFeatureFlags } from '@documenso/lib/client-only/providers/feature-flag'; import { cn } from '@documenso/ui/lib/utils'; import { Button } from '@documenso/ui/primitives/button'; import { Carousel } from './carousel'; export type HeroProps = { className?: string; [key: string]: unknown; }; const BackgroundPatternVariants: Variants = { initial: { opacity: 0, }, animate: { opacity: 1, transition: { delay: 1, duration: 1.2, }, }, }; const HeroTitleVariants: Variants = { initial: { opacity: 0, y: 60, }, animate: { opacity: 1, y: 0, transition: { duration: 0.5, }, }, }; const HeroCarouselVariants: Variants = { initial: { opacity: 0, y: 60, }, animate: { opacity: 1, y: 0, transition: { delay: 0.5, duration: 0.8, }, }, }; export const Hero = ({ className, ...props }: HeroProps) => { const event = usePlausible(); const { getFlag } = useFeatureFlags(); const heroMarketingCTA = getFlag('marketing_landing_hero_cta'); return (
background pattern
Document signing, finally open source. event('view-github')}> {match(heroMarketingCTA) .with('productHunt', () => ( Documenso - The open source DocuSign alternative | Product Hunt )) .otherwise(() => null)}
); };