Skip to content

Commit

Permalink
Debug ill-functioning of currency-redirect.tsx, revert changes in sha…
Browse files Browse the repository at this point in the history
…red locales
  • Loading branch information
DarkMenacer committed Jan 6, 2025
1 parent ef0e780 commit e58043d
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 9 deletions.
1 change: 1 addition & 0 deletions shared/locales/de/website-selection.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"text": "die die Unterstützung am meisten benötigen.”"
}
],
"amount": "USD 300,000+",
"amount-context": "Spenden erhalten ↗",
"scope": "Mehr ",
"continue-1": "Auswahlverfahren"
Expand Down
1 change: 1 addition & 0 deletions shared/locales/en/website-selection.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"text": "who need Social Income the most."
}
],
"amount": "USD 300,000+",
"amount-context": "raised to date ↗",
"scope": "visit our ",
"continue-1": "Selection Process"
Expand Down
1 change: 1 addition & 0 deletions shared/locales/fr/website-selection.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"text": "sur les personnes qui ont le plus besoin de Social Income."
}
],
"amount": "USD 300,000+",
"amount-context": "reçus à ce jour ↗",
"scope": "Plus de ",
"continue-1": "Processus de sélection"
Expand Down
1 change: 1 addition & 0 deletions shared/locales/it/website-selection.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"text": "che hanno più bisogno di Social Income."
}
],
"amount": "USD 300,000+",
"amount-context": "raccolti fino a oggi ↗",
"scope": "Più ",
"continue-1": "Processo di selezione"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DefaultParams } from '@/app/[lang]/[region]';
import { firestoreAdmin } from '@/firebase-admin';
import { WebsiteCurrency, WebsiteLanguage } from '@/i18n';
import { WebsiteCurrency } from '@/i18n';
import { Translator } from '@socialincome/shared/src/utils/i18n';
import { ContributionStatsCalculator } from '@socialincome/shared/src/utils/stats/ContributionStatsCalculator';
import { Button, Typography } from '@socialincome/ui';
Expand All @@ -10,7 +10,6 @@ import transparency from '../(assets)/transparency.svg';
import ScrollToChevron from '../(components)/scroll-to-chevron';

type ResourcePageProps = {
lang: WebsiteLanguage;
currency: string;
} & DefaultParams;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//TODO: Duplicate code fragment, can be eliminated by storing it's source somewhere common.
'use client';

import { useI18n } from '@/components/providers/context-providers';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { DefaultPageProps } from '@/app/[lang]/[region]';
import { WebsiteLanguage, WebsiteRegion } from '@/i18n';
import { DefaultParams } from '@/app/[lang]/[region]';
import { CurrencyRedirect } from '@/app/[lang]/[region]/(website)/transparency/recipient-selection/[currency]/currency-redirect';
import { WebsiteCurrency } from '@/i18n';
import { SelectionFaq } from './(sections)/faq';
import { HeroSection } from './(sections)/hero-section';
import { PastRounds } from './(sections)/past-rounds';
Expand All @@ -8,16 +9,14 @@ import { SelectionProcess } from './(sections)/selection-process';

type RecipientSelectionPageProps = {
params: {
region: WebsiteRegion;
lang: WebsiteLanguage;
currency: string;
};
} & DefaultPageProps;
} & DefaultParams;
};

export default async function Page({ params: { lang, region, currency } }: RecipientSelectionPageProps) {
return (
<div className="-mt-24 md:-mt-36">
{/*<CurrencyRedirect currency={currency as WebsiteCurrency} />*/}
<CurrencyRedirect currency={currency.toUpperCase() as WebsiteCurrency} />
<HeroSection lang={lang} region={region} />
<Resources lang={lang} region={region} currency={currency} />
<SelectionProcess lang={lang} region={region} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//TODO: Almost duplicate instead of the redirect, can be generalised as well probably
//TODO: shared/locales/[lang]/website-selection contains section2.amount which is no longer used anywhere
'use client';

import { useI18n } from '@/components/providers/context-providers';
Expand Down

0 comments on commit e58043d

Please sign in to comment.