feat: initial release
This commit is contained in:
parent
93a3177027
commit
bd32e067c4
@ -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
|
@ -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<ErrorBoundaryPageProps> = (props) => {
|
||||
}, [error])
|
||||
|
||||
return (
|
||||
<MainLayout>
|
||||
<h1 className="text-3xl font-semibold text-red-600">
|
||||
<MainLayout className="items-center justify-center text-center">
|
||||
<h1 className="text-3xl font-semibold">
|
||||
{t("errors.error")} 500 - {t("errors.server-error")}
|
||||
</h1>
|
||||
<p className="mb-4 mt-2">
|
||||
<button
|
||||
className="rounded-md bg-blue-600 px-3 py-2 text-white hover:bg-blue-800"
|
||||
onClick={reset}
|
||||
>
|
||||
{t("errors.try-again")}
|
||||
</button>
|
||||
<Button onClick={reset}>{t("errors.try-again")}</Button>
|
||||
</p>
|
||||
</MainLayout>
|
||||
)
|
||||
|
@ -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 (
|
||||
<MainLayout>
|
||||
<h1 className="text-3xl font-semibold text-red-600">
|
||||
<MainLayout className="items-center justify-center text-center">
|
||||
<h1 className="text-3xl font-semibold">
|
||||
{t("errors.error")} 404 - {t("errors.not-found")}
|
||||
</h1>
|
||||
<p className="mb-4 mt-2">
|
||||
{t("errors.page-doesnt-exist")}{" "}
|
||||
<Link href="/" className="text-blue-800 hover:underline">
|
||||
{t("errors.return-to-home-page")}
|
||||
</Link>
|
||||
<Link href="/">{t("errors.return-to-home-page")}</Link>
|
||||
</p>
|
||||
</MainLayout>
|
||||
)
|
||||
|
@ -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<HomePageProps> = (props) => {
|
||||
<Image src={WikipediaLogo} alt="Wikipedia" className="w-72" />
|
||||
</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 />
|
||||
</MainLayout>
|
||||
)
|
||||
|
@ -20,7 +20,7 @@ export const WikipediaClient: React.FC = () => {
|
||||
}
|
||||
|
||||
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">
|
||||
Wikipedia
|
||||
</Button>
|
||||
|
Reference in New Issue
Block a user