-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display contributions dynamically instead of hardcoding in shared/loc…
…ales
- Loading branch information
1 parent
cbd15aa
commit ef0e780
Showing
17 changed files
with
81 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion
2
...ient-selection/(components)/draw-card.tsx → ...ion/[currency]/(components)/draw-card.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ent-selection/(sections)/hero-section.tsx → ...on/[currency]/(sections)/hero-section.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ient-selection/(sections)/past-rounds.tsx → ...ion/[currency]/(sections)/past-rounds.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions
18
...ang]/[region]/(website)/transparency/recipient-selection/[currency]/currency-redirect.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
'use client'; | ||
|
||
import { useI18n } from '@/components/providers/context-providers'; | ||
import { WebsiteCurrency } from '@/i18n'; | ||
import { redirect } from 'next/navigation'; | ||
import { useEffect } from 'react'; | ||
|
||
export function CurrencyRedirect(props: { currency: WebsiteCurrency }) { | ||
const { currency } = useI18n(); | ||
|
||
useEffect(() => { | ||
if (currency && props.currency !== currency) { | ||
redirect('./' + currency.toLowerCase()); | ||
} | ||
}, [currency, props.currency]); | ||
|
||
return null; | ||
} |
28 changes: 28 additions & 0 deletions
28
...te/src/app/[lang]/[region]/(website)/transparency/recipient-selection/[currency]/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { DefaultPageProps } from '@/app/[lang]/[region]'; | ||
import { WebsiteLanguage, WebsiteRegion } from '@/i18n'; | ||
import { SelectionFaq } from './(sections)/faq'; | ||
import { HeroSection } from './(sections)/hero-section'; | ||
import { PastRounds } from './(sections)/past-rounds'; | ||
import { Resources } from './(sections)/resources'; | ||
import { SelectionProcess } from './(sections)/selection-process'; | ||
|
||
type RecipientSelectionPageProps = { | ||
params: { | ||
region: WebsiteRegion; | ||
lang: WebsiteLanguage; | ||
currency: string; | ||
}; | ||
} & DefaultPageProps; | ||
|
||
export default async function Page({ params: { lang, region, currency } }: RecipientSelectionPageProps) { | ||
return ( | ||
<div className="-mt-24 md:-mt-36"> | ||
{/*<CurrencyRedirect currency={currency as WebsiteCurrency} />*/} | ||
<HeroSection lang={lang} region={region} /> | ||
<Resources lang={lang} region={region} currency={currency} /> | ||
<SelectionProcess lang={lang} region={region} /> | ||
<PastRounds lang={lang} region={region} /> | ||
<SelectionFaq lang={lang} region={region} /> | ||
</div> | ||
); | ||
} |
27 changes: 11 additions & 16 deletions
27
website/src/app/[lang]/[region]/(website)/transparency/recipient-selection/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
import { DefaultPageProps } from '@/app/[lang]/[region]'; | ||
import { SelectionFaq } from './(sections)/faq'; | ||
import { HeroSection } from './(sections)/hero-section'; | ||
import { PastRounds } from './(sections)/past-rounds'; | ||
import { Resources } from './(sections)/resources'; | ||
import { SelectionProcess } from './(sections)/selection-process'; | ||
'use client'; | ||
|
||
export default async function Page({ params: { lang, region } }: DefaultPageProps) { | ||
return ( | ||
<div className="-mt-24 md:-mt-36"> | ||
<HeroSection lang={lang} region={region} /> | ||
<Resources lang={lang} region={region} /> | ||
<SelectionProcess lang={lang} region={region} /> | ||
<PastRounds lang={lang} region={region} /> | ||
<SelectionFaq lang={lang} region={region} /> | ||
</div> | ||
); | ||
import { useI18n } from '@/components/providers/context-providers'; | ||
import { redirect } from 'next/navigation'; | ||
import { useEffect } from 'react'; | ||
|
||
export default function Page() { | ||
const { currency } = useI18n(); | ||
|
||
useEffect(() => { | ||
redirect('./recipient-selection/' + currency?.toLowerCase()); | ||
}, [currency]); | ||
} |