Skip to content

Commit

Permalink
feature(website): quiz pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ssandino authored Apr 21, 2024
1 parent bf23d9a commit 7e12a91
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
14 changes: 14 additions & 0 deletions shared/locales/de/website-quiz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"metadata": {
"title": "Quizantwort ",
"description": "Deine Antwort ist entweder richtig oder falsch. Finde es heraus.",
"keywords": "Quizergebnisse, sofortige Rückmeldung, Geografiequiz",
"url": "https://socialincome.org/",
"og-image": "/assets/metadata/og/default.jpg",
"twitter-image": "/assets/metadata/twitter/default.jpg"
},
"result": {
"right": "Genau richtig!",
"wrong": "Nicht ganz, aber guter Versuch!"
}
}
14 changes: 14 additions & 0 deletions shared/locales/en/website-quiz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"metadata": {
"title": "Quick Quiz Results!",
"description": "Discover your quiz results instantly. Whether you nailed it or need a retry, we'll let you knonw.",
"keywords": "Quiz Results, Instant Feedback, Geography Quiz",
"url": "https://socialincome.org/",
"og-image": "/assets/metadata/og/default.jpg",
"twitter-image": "/assets/metadata/twitter/default.jpg"
},
"result": {
"right": "Spot on!",
"wrong": "Not quite, but good try!"
}
}
20 changes: 20 additions & 0 deletions website/src/app/[lang]/[region]/(website)/(quiz)/right/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { DefaultPageProps } from '@/app/[lang]/[region]';
import { Translator } from '@socialincome/shared/src/utils/i18n';
import { BaseContainer, Typography } from '@socialincome/ui';

export default async function Page({ params }: DefaultPageProps) {
const translator = await Translator.getInstance({
language: params.lang,
namespaces: ['website-quiz'],
});

return (
<BaseContainer className="min-h-screen-navbar flex items-center justify-center">
<div>
<Typography size="5xl" weight="medium" className="text-center">
{translator.t('result.right')}
</Typography>
</div>
</BaseContainer>
);
}
20 changes: 20 additions & 0 deletions website/src/app/[lang]/[region]/(website)/(quiz)/wrong/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { DefaultPageProps } from '@/app/[lang]/[region]';
import { Translator } from '@socialincome/shared/src/utils/i18n';
import { BaseContainer, Typography } from '@socialincome/ui';

export default async function Page({ params }: DefaultPageProps) {
const translator = await Translator.getInstance({
language: params.lang,
namespaces: ['website-quiz'],
});

return (
<BaseContainer className="min-h-screen-navbar flex items-center justify-center">
<div>
<Typography size="5xl" weight="medium" className="text-center">
{translator.t('result.wrong')}
</Typography>
</div>
</BaseContainer>
);
}

0 comments on commit 7e12a91

Please sign in to comment.