From 95d12327ccd0255cac3838fc8683ff3de0062b82 Mon Sep 17 00:00:00 2001 From: Aaron Couch Date: Wed, 11 Sep 2024 17:51:04 -0400 Subject: [PATCH] Update opp page.tsx to not dupe breadcrumbs --- frontend/src/app/[locale]/opportunity/[id]/page.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/[locale]/opportunity/[id]/page.tsx b/frontend/src/app/[locale]/opportunity/[id]/page.tsx index c4b5e80d4..c0d6e29f0 100644 --- a/frontend/src/app/[locale]/opportunity/[id]/page.tsx +++ b/frontend/src/app/[locale]/opportunity/[id]/page.tsx @@ -33,6 +33,7 @@ export default async function OpportunityListing({ params: { id: string }; }) { const id = Number(params.id); + const breadcrumbs = Object.assign([], OPPORTUNITY_CRUMBS); // Opportunity id needs to be a number greater than 1 if (isNaN(id) || id < 0) { return ; @@ -53,7 +54,7 @@ export default async function OpportunityListing({ const opportunityData: Opportunity = opportunity.data; - OPPORTUNITY_CRUMBS.push({ + breadcrumbs.push({ title: opportunityData.opportunity_title, path: `/opportunity/${opportunityData.opportunity_id}/`, }); @@ -61,7 +62,7 @@ export default async function OpportunityListing({ return (
- +