feat: initial release
All checks were successful
Chromatic / chromatic (push) Successful in 2m33s
CI / ci (push) Successful in 3m13s
CI / commitlint (push) Successful in 14s
Release / release (push) Successful in 55s

This commit is contained in:
Théo LUDWIG 2024-07-24 12:58:29 +02:00
parent 93a3177027
commit bd32e067c4
Signed by: theoludwig
GPG Key ID: ADFE5A563D718F3B
7 changed files with 11 additions and 60 deletions

View File

@ -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<HomePageProps> = (props) => {
const { params } = props
// Enable static rendering
unstable_setRequestLocale(params.locale)
return (
<MainLayout>
<section className="my-6 flex items-center space-x-6">
<Button leftIcon={<FaRocket size={18} />} href="/">
Home
</Button>
</section>
</MainLayout>
)
}
export default AboutPage

View File

@ -1,5 +1,6 @@
"use client" "use client"
import { Button } from "@repo/ui/design/Button"
import { MainLayout } from "@repo/ui/MainLayout" import { MainLayout } from "@repo/ui/MainLayout"
import { useTranslations } from "next-intl" import { useTranslations } from "next-intl"
import { useEffect } from "react" import { useEffect } from "react"
@ -19,17 +20,12 @@ const ErrorBoundaryPage: React.FC<ErrorBoundaryPageProps> = (props) => {
}, [error]) }, [error])
return ( return (
<MainLayout> <MainLayout className="items-center justify-center text-center">
<h1 className="text-3xl font-semibold text-red-600"> <h1 className="text-3xl font-semibold">
{t("errors.error")} 500 - {t("errors.server-error")} {t("errors.error")} 500 - {t("errors.server-error")}
</h1> </h1>
<p className="mb-4 mt-2"> <p className="mb-4 mt-2">
<button <Button onClick={reset}>{t("errors.try-again")}</Button>
className="rounded-md bg-blue-600 px-3 py-2 text-white hover:bg-blue-800"
onClick={reset}
>
{t("errors.try-again")}
</button>
</p> </p>
</MainLayout> </MainLayout>
) )

View File

@ -1,4 +1,4 @@
import { Link } from "@repo/i18n/navigation" import { Link } from "@repo/ui/design/Link"
import { MainLayout } from "@repo/ui/MainLayout" import { MainLayout } from "@repo/ui/MainLayout"
import { useTranslations } from "next-intl" import { useTranslations } from "next-intl"
@ -9,15 +9,13 @@ const NotFound: React.FC = () => {
const t = useTranslations() const t = useTranslations()
return ( return (
<MainLayout> <MainLayout className="items-center justify-center text-center">
<h1 className="text-3xl font-semibold text-red-600"> <h1 className="text-3xl font-semibold">
{t("errors.error")} 404 - {t("errors.not-found")} {t("errors.error")} 404 - {t("errors.not-found")}
</h1> </h1>
<p className="mb-4 mt-2"> <p className="mb-4 mt-2">
{t("errors.page-doesnt-exist")}{" "} {t("errors.page-doesnt-exist")}{" "}
<Link href="/" className="text-blue-800 hover:underline"> <Link href="/">{t("errors.return-to-home-page")}</Link>
{t("errors.return-to-home-page")}
</Link>
</p> </p>
</MainLayout> </MainLayout>
) )

View File

@ -1,5 +1,4 @@
import type { LocaleProps } from "@repo/i18n/config" import type { LocaleProps } from "@repo/i18n/config"
import { Button } from "@repo/ui/design/Button"
import { Link } from "@repo/ui/design/Link" import { Link } from "@repo/ui/design/Link"
import { Typography } from "@repo/ui/design/Typography" import { Typography } from "@repo/ui/design/Typography"
import { MainLayout } from "@repo/ui/MainLayout" import { MainLayout } from "@repo/ui/MainLayout"
@ -7,7 +6,6 @@ import { WikipediaClient } from "@repo/wikipedia-game-solver/WikipediaClient"
import { useTranslations } from "next-intl" import { useTranslations } from "next-intl"
import { unstable_setRequestLocale } from "next-intl/server" import { unstable_setRequestLocale } from "next-intl/server"
import Image from "next/image" import Image from "next/image"
import { FaRocket } from "react-icons/fa6"
import WikipediaLogo from "#public/images/Wikipedia-Logo.png" import WikipediaLogo from "#public/images/Wikipedia-Logo.png"
@ -45,21 +43,6 @@ const HomePage: React.FC<HomePageProps> = (props) => {
<Image src={WikipediaLogo} alt="Wikipedia" className="w-72" /> <Image src={WikipediaLogo} alt="Wikipedia" className="w-72" />
</section> </section>
<section className="my-6 flex items-center space-x-6">
<Button leftIcon={<FaRocket size={18} />} href="/about">
About
</Button>
<Button
leftIcon={<FaRocket size={18} />}
variant="outline"
href="/"
target="_blank"
>
Get Started
</Button>
</section>
<WikipediaClient /> <WikipediaClient />
</MainLayout> </MainLayout>
) )

View File

@ -20,7 +20,7 @@ export const WikipediaClient: React.FC = () => {
} }
return ( return (
<section className="my-6 flex items-center space-x-6"> <section className="my-6 flex items-center justify-center space-x-6">
<Button onClick={handleClick} isLoading={isLoading} className="w-36"> <Button onClick={handleClick} isLoading={isLoading} className="w-36">
Wikipedia Wikipedia
</Button> </Button>