From 42d1de933f0ea8677123ea209bec97a437b03afb Mon Sep 17 00:00:00 2001 From: Manuel Bustillo Date: Sun, 8 Jun 2025 09:10:35 +0200 Subject: [PATCH] WIP invitation layout --- app/[slug]/site/invitation/[id]/page.tsx | 90 +++++++++++++++++++++--- app/lib/guest.tsx | 55 +++++++++++++-- 2 files changed, 130 insertions(+), 15 deletions(-) diff --git a/app/[slug]/site/invitation/[id]/page.tsx b/app/[slug]/site/invitation/[id]/page.tsx index 8ac4b40..f7f4920 100644 --- a/app/[slug]/site/invitation/[id]/page.tsx +++ b/app/[slug]/site/invitation/[id]/page.tsx @@ -3,12 +3,76 @@ 'use client'; import { AbstractApi } from '@/app/api/abstract-api'; +import { Guest } from '@/app/lib/guest'; import { Invitation, InvitationSerializer } from '@/app/lib/invitation'; import { useParams } from 'next/navigation'; +import { Dropdown } from 'primereact/dropdown'; import { TabPanel, TabView } from 'primereact/tabview'; import { useEffect, useState } from 'react'; +function GuestForm({ guest }: { guest: Guest }) { + const [formResponses, setFormResponses] = useState(guest.formResponses || {}); + + return ( +
+
+ + + setFormResponses((prev) => ({ + ...prev, + busNeeded: e.value === 'Yes', + })) + } + placeholder="Select an option" + className="w-full" + /> +
+
+ +