Skip to content

Commit

Permalink
fix: query params don't update on tab switch
Browse files Browse the repository at this point in the history
  • Loading branch information
bohdangarchu committed Jan 20, 2025
1 parent fbc1504 commit 0844777
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/app/comparison-portal/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ export const metadata: Metadata = {
template: `%s - ${siteConfig.name}`,
},
description:
'Compare real-time global hunger data across different countries and regions. Obtain food insecurity statistics from the WFP Hunger Map Comparison Portal, tailored to various time zones. A valuable resource for humanitarian efforts and research.',
'Compare real-time global hunger data across different countries and regions. A valuable resource for humanitarian efforts and research.',
keywords: siteConfig.keywords,
openGraph: {
title: `Comparison Portal - ${siteConfig.name}`,
description:
'Compare real-time global hunger data across different countries and regions. Obtain food insecurity statistics from the WFP Hunger Map Comparison Portal, tailored to various time zones. Essential for humanitarian aid and research.',
'Compare real-time global hunger data across different countries and regions. Essential for humanitarian aid and research.',
url: `${siteConfig.domain}/comparison-portal`,
images: [
{
Expand All @@ -31,7 +31,7 @@ export const metadata: Metadata = {
card: 'summary_large_image',
title: `Comparison Portal - ${siteConfig.name}`,
description:
'Access comparable global hunger data from the WFP Hunger Map Comparison Portal, tailored to different countries and time zones.',
'Access comparable global hunger data from the WFP Hunger Map Comparison Portal, tailored to different countries and regions.',
images: [
{
url: '/Images/Comparison-preview.png',
Expand Down
1 change: 0 additions & 1 deletion src/domain/hooks/queryParamsHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export const useSelectedTab = () => {
}, [searchParams]);

const setSelectedTabFn = (tab: string) => {
setSelectedTab(tab);
const updatedParams = new URLSearchParams(searchParams.toString());
if (tab) {
updatedParams.set(PARAM_NAME, tab);
Expand Down

0 comments on commit 0844777

Please sign in to comment.