Skip to content

Commit

Permalink
fix: pillar page list search params
Browse files Browse the repository at this point in the history
  • Loading branch information
johnshift committed Dec 20, 2024
1 parent 22285c5 commit a090074
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/app/organizations/[pillar]/[item]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ interface Props {
}

const Page = ({ params, searchParams }: Props) => {
const { include, ...restSearchParams } = searchParams;
const pillarValue = include ? `${params.item},${include}` : params.item;
return (
<PillarPage
nav="organizations"
Expand All @@ -17,10 +19,8 @@ const Page = ({ params, searchParams }: Props) => {
content={
<OrgListClient
searchParams={{
nav: 'organizations',
pillar: params.pillar,
item: params.item,
...searchParams,
[params.pillar]: pillarValue,
...restSearchParams,
}}
/>
}
Expand Down
8 changes: 4 additions & 4 deletions src/app/projects/[pillar]/[item]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ interface Props {
}

const Page = ({ params, searchParams }: Props) => {
const { include, ...restSearchParams } = searchParams;
const pillarValue = include ? `${params.item},${include}` : params.item;
return (
<PillarPage
nav="projects"
Expand All @@ -17,10 +19,8 @@ const Page = ({ params, searchParams }: Props) => {
content={
<ProjectListClient
searchParams={{
nav: 'organizations',
pillar: params.pillar,
item: params.item,
...searchParams,
[params.pillar]: pillarValue,
...restSearchParams,
}}
/>
}
Expand Down

0 comments on commit a090074

Please sign in to comment.