Skip to content

Commit

Permalink
Update opp page for ISR
Browse files Browse the repository at this point in the history
  • Loading branch information
acouch committed Nov 7, 2024
1 parent e513579 commit 12aab7f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions frontend/src/app/[locale]/opportunity/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import NotFound from "src/app/[locale]/not-found";
import fetchers from "src/app/api/Fetchers";
import { OPPORTUNITY_CRUMBS } from "src/constants/breadcrumbs";
import { ApiRequestError, parseErrorStatus } from "src/errors";
import withFeatureFlag from "src/hoc/search/withFeatureFlag";
import { Opportunity } from "src/types/opportunity/opportunityResponseTypes";

import { getTranslations } from "next-intl/server";
Expand Down Expand Up @@ -41,6 +40,10 @@ export async function generateMetadata({ params }: { params: { id: string } }) {
return meta;
}

export function generateStaticParams() {
return [];
}

function emptySummary() {
return {
additional_info_url: null,
Expand Down Expand Up @@ -77,7 +80,11 @@ function emptySummary() {
};
}

async function OpportunityListing({ params }: { params: { id: string } }) {
export default async function OpportunityListing({
params,
}: {
params: { id: string };
}) {
const id = Number(params.id);
const breadcrumbs = Object.assign([], OPPORTUNITY_CRUMBS);
// Opportunity id needs to be a number greater than 1
Expand Down Expand Up @@ -127,5 +134,3 @@ async function OpportunityListing({ params }: { params: { id: string } }) {
</div>
);
}

export default withFeatureFlag(OpportunityListing, "showSearchV0");

0 comments on commit 12aab7f

Please sign in to comment.