Files
wedding-website/components/invite/wedding-invite.tsx
T
2026-09-12 23:50:10 +02:00

48 lines
1.8 KiB
TypeScript

import { DetailsSection } from "@/components/invite/details-section"
import { FaqSection } from "@/components/invite/faq-section"
import { HeroSection } from "@/components/invite/hero-section"
import { IntroductionSection } from "@/components/invite/introduction-section"
import { RsvpSection } from "@/components/invite/rsvp-section"
import { ScheduleSection } from "@/components/invite/schedule-section"
import { StorySection } from "@/components/invite/story-section"
import type { InvitationDetail } from "@/lib/db/queries/invitations"
import type { ToastRequest } from "@/lib/db/types"
import type { GuestDictionary } from "@/lib/i18n/dictionaries"
import type { InvitePageContent } from "@/lib/i18n/invite-page/content"
export function WeddingInvite({
action,
detail,
token,
dictionary,
content,
closed,
toastRequest,
photo,
submitted,
error,
}: {
action: (formData: FormData) => void | Promise<void>
detail: InvitationDetail
token: string
dictionary: GuestDictionary
content: InvitePageContent
closed: boolean
toastRequest: ToastRequest | undefined
photo: { filename: string | null; url: string } | null
submitted?: string
error?: string
}) {
return (
<main className="overflow-x-hidden bg-wedding-ivory text-wedding-ink">
<HeroSection content={content.hero} />
<IntroductionSection content={content.introduction} />
<StorySection content={content.story} />
<DetailsSection content={content.details} />
<ScheduleSection content={content.schedule} />
<FaqSection content={content.faq} />
<RsvpSection action={action} detail={detail} token={token} dictionary={dictionary} content={content.rsvp} closed={closed} toastRequest={toastRequest} photo={photo} submitted={submitted} error={error} />
</main>
)
}