From 03cb95b4b316770ee636ec850cdb4e832ca7618e Mon Sep 17 00:00:00 2001 From: Felipe Cardoso Date: Fri, 14 Mar 2025 15:27:13 +0100 Subject: [PATCH] Refactor gift registry UI to use InfoCard component Simplified the gift registry section by replacing custom JSX with the reusable InfoCard component. This improves code maintainability and consistency in the UI while retaining the existing styles and functionality. Updated InfoCard styling to ensure compatibility with the new use case. --- .../src/app/(public)/invite/[slug]/page.tsx | 76 +++++-------------- frontend/src/components/info-card.tsx | 3 +- 2 files changed, 23 insertions(+), 56 deletions(-) diff --git a/frontend/src/app/(public)/invite/[slug]/page.tsx b/frontend/src/app/(public)/invite/[slug]/page.tsx index 86251cf..288175f 100644 --- a/frontend/src/app/(public)/invite/[slug]/page.tsx +++ b/frontend/src/app/(public)/invite/[slug]/page.tsx @@ -252,61 +252,27 @@ const InvitationPage = () => { )} {/* Gift Registry with Lion */} {event.gift_registry_enabled && ( -
-
-
- {getAssetUrl("lion") ? ( -
- Lion -
- ) : ( -

Lion

- )} -
-
- -

- Gift Registry -

-

- View Emma's Wishes -

-
- - - -
-
-
+ )} {/* View Map Button */} {event.location_url && ( diff --git a/frontend/src/components/info-card.tsx b/frontend/src/components/info-card.tsx index af74b42..3b204c0 100644 --- a/frontend/src/components/info-card.tsx +++ b/frontend/src/components/info-card.tsx @@ -75,12 +75,13 @@ const InfoCard: React.FC = ({ imagePosition === "right" ? "md:flex-row-reverse md:space-x-reverse" : "md:flex-row", + "w-full", )} > {imageElement} {imageSrc && (