From bd32e067c49a61c2c1e7aec9463b920a69ac860b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Wed, 24 Jul 2024 12:58:29 +0200 Subject: [PATCH] feat: initial release --- apps/website/app/[locale]/about/page.tsx | 26 ------------------- apps/website/app/[locale]/error.tsx | 12 +++------ apps/website/app/[locale]/not-found.tsx | 10 +++---- apps/website/app/[locale]/page.tsx | 17 ------------ packages/i18n/src/translations/en-US.json | 2 +- packages/i18n/src/translations/fr-FR.json | 2 +- .../src/WikipediaClient.tsx | 2 +- 7 files changed, 11 insertions(+), 60 deletions(-) delete mode 100644 apps/website/app/[locale]/about/page.tsx diff --git a/apps/website/app/[locale]/about/page.tsx b/apps/website/app/[locale]/about/page.tsx deleted file mode 100644 index 34a2f71..0000000 --- a/apps/website/app/[locale]/about/page.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import type { LocaleProps } from "@repo/i18n/config" -import { MainLayout } from "@repo/ui/MainLayout" -import { Button } from "@repo/ui/design/Button" -import { unstable_setRequestLocale } from "next-intl/server" -import { FaRocket } from "react-icons/fa6" - -interface HomePageProps extends LocaleProps {} - -const AboutPage: React.FC = (props) => { - const { params } = props - - // Enable static rendering - unstable_setRequestLocale(params.locale) - - return ( - -
- -
-
- ) -} - -export default AboutPage diff --git a/apps/website/app/[locale]/error.tsx b/apps/website/app/[locale]/error.tsx index 265b29c..94f51c3 100644 --- a/apps/website/app/[locale]/error.tsx +++ b/apps/website/app/[locale]/error.tsx @@ -1,5 +1,6 @@ "use client" +import { Button } from "@repo/ui/design/Button" import { MainLayout } from "@repo/ui/MainLayout" import { useTranslations } from "next-intl" import { useEffect } from "react" @@ -19,17 +20,12 @@ const ErrorBoundaryPage: React.FC = (props) => { }, [error]) return ( - -

+ +

{t("errors.error")} 500 - {t("errors.server-error")}

- +

) diff --git a/apps/website/app/[locale]/not-found.tsx b/apps/website/app/[locale]/not-found.tsx index 6c9da44..df1371f 100644 --- a/apps/website/app/[locale]/not-found.tsx +++ b/apps/website/app/[locale]/not-found.tsx @@ -1,4 +1,4 @@ -import { Link } from "@repo/i18n/navigation" +import { Link } from "@repo/ui/design/Link" import { MainLayout } from "@repo/ui/MainLayout" import { useTranslations } from "next-intl" @@ -9,15 +9,13 @@ const NotFound: React.FC = () => { const t = useTranslations() return ( - -

+ +

{t("errors.error")} 404 - {t("errors.not-found")}

{t("errors.page-doesnt-exist")}{" "} - - {t("errors.return-to-home-page")} - + {t("errors.return-to-home-page")}

) diff --git a/apps/website/app/[locale]/page.tsx b/apps/website/app/[locale]/page.tsx index 913f969..526b523 100644 --- a/apps/website/app/[locale]/page.tsx +++ b/apps/website/app/[locale]/page.tsx @@ -1,5 +1,4 @@ import type { LocaleProps } from "@repo/i18n/config" -import { Button } from "@repo/ui/design/Button" import { Link } from "@repo/ui/design/Link" import { Typography } from "@repo/ui/design/Typography" import { MainLayout } from "@repo/ui/MainLayout" @@ -7,7 +6,6 @@ import { WikipediaClient } from "@repo/wikipedia-game-solver/WikipediaClient" import { useTranslations } from "next-intl" import { unstable_setRequestLocale } from "next-intl/server" import Image from "next/image" -import { FaRocket } from "react-icons/fa6" import WikipediaLogo from "#public/images/Wikipedia-Logo.png" @@ -45,21 +43,6 @@ const HomePage: React.FC = (props) => { Wikipedia -
- - - -
- ) diff --git a/packages/i18n/src/translations/en-US.json b/packages/i18n/src/translations/en-US.json index 5fa15d5..ebe4bdc 100644 --- a/packages/i18n/src/translations/en-US.json +++ b/packages/i18n/src/translations/en-US.json @@ -14,7 +14,7 @@ "not-found": "Not Found", "server-error": "Internal Server Error!", "return-to-home-page": "Return to the home page?", - "try-again": "Try again ?" + "try-again": "Try again?" }, "home": { "title": "Wikipedia Game Solver", diff --git a/packages/i18n/src/translations/fr-FR.json b/packages/i18n/src/translations/fr-FR.json index 773e8ce..dc97706 100644 --- a/packages/i18n/src/translations/fr-FR.json +++ b/packages/i18n/src/translations/fr-FR.json @@ -10,7 +10,7 @@ }, "errors": { "error": "Erreur", - "page-doesnt-exist": "Cette page n'existe pas!", + "page-doesnt-exist": "Cette page n'existe pas !", "not-found": "Introuvable", "server-error": "Erreur interne du serveur !", "return-to-home-page": "Retour à la page d'accueil ?", diff --git a/packages/wikipedia-game-solver/src/WikipediaClient.tsx b/packages/wikipedia-game-solver/src/WikipediaClient.tsx index d2dd7ed..940ba5c 100644 --- a/packages/wikipedia-game-solver/src/WikipediaClient.tsx +++ b/packages/wikipedia-game-solver/src/WikipediaClient.tsx @@ -20,7 +20,7 @@ export const WikipediaClient: React.FC = () => { } return ( -
+