From 7e12a91ba1d499b8a32601b57ca3ca188777d6c8 Mon Sep 17 00:00:00 2001 From: Sandino Scheidegger Date: Sun, 21 Apr 2024 10:41:39 +0200 Subject: [PATCH] feature(website): quiz pages --- shared/locales/de/website-quiz.json | 14 +++++++++++++ shared/locales/en/website-quiz.json | 14 +++++++++++++ .../[region]/(website)/(quiz)/right/page.tsx | 20 +++++++++++++++++++ .../[region]/(website)/(quiz)/wrong/page.tsx | 20 +++++++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 shared/locales/de/website-quiz.json create mode 100644 shared/locales/en/website-quiz.json create mode 100644 website/src/app/[lang]/[region]/(website)/(quiz)/right/page.tsx create mode 100644 website/src/app/[lang]/[region]/(website)/(quiz)/wrong/page.tsx diff --git a/shared/locales/de/website-quiz.json b/shared/locales/de/website-quiz.json new file mode 100644 index 000000000..02d45666a --- /dev/null +++ b/shared/locales/de/website-quiz.json @@ -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!" + } +} diff --git a/shared/locales/en/website-quiz.json b/shared/locales/en/website-quiz.json new file mode 100644 index 000000000..77473d3c0 --- /dev/null +++ b/shared/locales/en/website-quiz.json @@ -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!" + } +} diff --git a/website/src/app/[lang]/[region]/(website)/(quiz)/right/page.tsx b/website/src/app/[lang]/[region]/(website)/(quiz)/right/page.tsx new file mode 100644 index 000000000..16cf0127c --- /dev/null +++ b/website/src/app/[lang]/[region]/(website)/(quiz)/right/page.tsx @@ -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 ( + +
+ + {translator.t('result.right')} + +
+
+ ); +} diff --git a/website/src/app/[lang]/[region]/(website)/(quiz)/wrong/page.tsx b/website/src/app/[lang]/[region]/(website)/(quiz)/wrong/page.tsx new file mode 100644 index 000000000..f4b5500aa --- /dev/null +++ b/website/src/app/[lang]/[region]/(website)/(quiz)/wrong/page.tsx @@ -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 ( + +
+ + {translator.t('result.wrong')} + +
+
+ ); +}