diff --git a/src/components/RSVPManager.tsx b/src/components/RSVPManager.tsx index e6aea09..6a93b4f 100644 --- a/src/components/RSVPManager.tsx +++ b/src/components/RSVPManager.tsx @@ -58,6 +58,40 @@ const RSVPManager = () => { } }; + const handleExportCSV = () => { + // Create CSV content + const headers = ["Name", "Status", "Dietary Restrictions", "Notes", "Response Date"]; + const rows = rsvpList.map(rsvp => [ + rsvp.name, + rsvp.attending ? "Attending" : "Not Attending", + rsvp.dietaryRestrictions || "", + rsvp.notes || "", + new Date(rsvp.timestamp).toLocaleDateString('en-US', { + year: 'numeric', + month: 'short', + day: 'numeric', + hour: '2-digit', + minute: '2-digit' + }) + ]); + + // Convert to CSV string + const csvContent = [ + headers.join(","), + ...rows.map(row => row.map(cell => `"${String(cell).replace(/"/g, '""')}"`).join(",")) + ].join("\n"); + + // Create and trigger download + const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' }); + const link = document.createElement("a"); + const url = URL.createObjectURL(blob); + link.setAttribute("href", url); + link.setAttribute("download", `rsvp_list_${new Date().toISOString().split('T')[0]}.csv`); + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + }; + useEffect(() => { fetchRSVPList(); @@ -147,6 +181,14 @@ const RSVPManager = () => { + + ); }; diff --git a/src/pages/faq.astro b/src/pages/faq.astro deleted file mode 100644 index 9494604..0000000 --- a/src/pages/faq.astro +++ /dev/null @@ -1,118 +0,0 @@ ---- -import Layout from "../layouts/Layout.astro"; ---- - - -
-
-

Frequently Asked Questions

-
- -
- -
- -
- Dress Code -
-
-

- Semi-formal, any colour you want. Want to get dressed up? Go for it! Want to wear a shirt with no stains on it? Go for it! - There will be dancing, so choose your wardrobe accordingly. Maybe don't wear a white dress... -

-
-
- - -
- -
- Dietary Restrictions -
-
-

- We will do our best to accommodate any dietary restrictions you have! Our caterer can cook gluten/dairy/peanut free etc. - but may not be able to guarantee that there are no traces of allergens in the food. Please contact us if you have any concerns. -

-
-
- - -
- -
- Alcohol -
-
-

- We will not be serving alcohol. -

-
-
- - -
- -
- Childcare -
-
-

- Your young children are adorable and welcome, but we don't have childcare or designated areas for naps etc. - If you have any concerns, please contact us. -

-
-
- - -
- -
- Gifts -
-
-

- The best gift is you sharing in our joy! Don't feel obligated. If you would like to give a physical gift, - cash is preferred, but we do have a registry available on this website as well. - Ix would be over the moon if someone found him a - hurdy-gurdy. -

-
-
- - -
- -
- Can I Help With Anything? -
-
-

- If you're up for staying a bit later, we could definitely use your help cleaning up the venues when the wedding is done! - Tony and Gladys will be coordinating that the day-of, please speak with them. If you want to help with wedding preparations, - please contact Ix or Natasha. Thank you! -

-
-
- - -
- -
- I have all these concerns, what do I do? -
-
-
-

Email us at: ixabatasha25@proton.me

-

Call/text Natasha: 1 (306) 292-9000

-

Call/text Ix: 1 (306) 717-9403

-
-
-
-
- - -
-
\ No newline at end of file diff --git a/src/pages/faq/index.astro b/src/pages/faq/index.astro new file mode 100644 index 0000000..e3ce2e6 --- /dev/null +++ b/src/pages/faq/index.astro @@ -0,0 +1,148 @@ +--- +import Layout from "../../layouts/Layout.astro"; +import SignIn from "../../components/SignIn.tsx"; +--- + + +
+
+ Frequently Asked Questions +
+ +
+ {}} requiredRole="guest" /> +
+ + +
+
+ + \ No newline at end of file