diff --git a/app/pages/EventDetailPage/EventDetailPage.test.tsx b/app/pages/EventDetailPage/EventDetailPage.test.tsx index 6ce788ad7..58dd37b61 100644 --- a/app/pages/EventDetailPage/EventDetailPage.test.tsx +++ b/app/pages/EventDetailPage/EventDetailPage.test.tsx @@ -44,10 +44,10 @@ it("displays every page section and table row", async () => { [ "About", "Details", - "Registration", + "Additional Information", "Tags", "Date & Time", - "Event Link", + "View Details", "Categories", "Eligibilities", "Age Group", diff --git a/app/pages/EventDetailPage/EventDetailPage.tsx b/app/pages/EventDetailPage/EventDetailPage.tsx index 00265ba3e..c92b40c14 100644 --- a/app/pages/EventDetailPage/EventDetailPage.tsx +++ b/app/pages/EventDetailPage/EventDetailPage.tsx @@ -74,7 +74,7 @@ export const EventDetailPage = () => { const registrationRows = [ { - title: "Event Link", + title: "View Details", value: data.registration_link?.url ? ( { > {data.registration_link.url} - ) : ( - "No registration link available" - ), + ) : null, }, ]; @@ -156,20 +154,22 @@ export const EventDetailPage = () => { /> - - - rowRenderer={(detail) => ( - - {detail.title} - {detail.value} - - )} - rows={registrationRows} - /> - + {data.registration_link?.url && ( + + + rowRenderer={(detail) => ( + + {detail.title} + {detail.value} + + )} + rows={registrationRows} + /> + + )} = [ { algoliaCategoryName: "Education", id: "358", - name: "Education", + name: "Education, After School, & Summer Programs", slug: "education", steps: ["subcategories", "results"], subcategorySubheading: defaultSubheading, diff --git a/test/fixtures/EventsData.ts b/test/fixtures/EventsData.ts index 80c2496e6..dc1ab74e3 100644 --- a/test/fixtures/EventsData.ts +++ b/test/fixtures/EventsData.ts @@ -9,6 +9,9 @@ export const EVENTS_DATA = [ { data: { id: 67, + registration_link: { + url: "https://www.our415.org", + }, attributes: { title: "Back to School Conference", createdAt: "2024-07-22T23:54:56.662Z", @@ -1404,6 +1407,11 @@ export const createFormattedEventData = (): ReturnType< typeof useEventData >["data"] => ({ ...EVENTS_DATA[0].data.attributes, + registration_link: { + id: EVENTS_DATA[0].data.id, + text: "Register", + url: EVENTS_DATA[0].data.registration_link?.url || "", + }, id: 10, categories: [{ id: 11111, label: "Fake Label" }], eligibilities: [{ id: 11111, label: "Fake Label" }],