From 65e91fc6f682c6976f82585b2354e3746facb2c0 Mon Sep 17 00:00:00 2001 From: nxtkofi Date: Tue, 21 Apr 2026 20:53:33 +0200 Subject: [PATCH] chore(app): move pages to locale segment Move home, sign-in, and sign-up pages under app/[locale] for next-intl routing support. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src/app/{ => [locale]}/page.tsx | 2 +- src/app/[locale]/sign-in/page.tsx | 20 ++++++++++++++++++++ src/app/sign-in/page.tsx | 5 ----- src/app/sign-up/page.tsx | 5 ----- 4 files changed, 21 insertions(+), 11 deletions(-) rename src/app/{ => [locale]}/page.tsx (76%) create mode 100644 src/app/[locale]/sign-in/page.tsx delete mode 100644 src/app/sign-in/page.tsx delete mode 100644 src/app/sign-up/page.tsx diff --git a/src/app/page.tsx b/src/app/[locale]/page.tsx similarity index 76% rename from src/app/page.tsx rename to src/app/[locale]/page.tsx index 2601391..d1156e4 100644 --- a/src/app/page.tsx +++ b/src/app/[locale]/page.tsx @@ -1,5 +1,5 @@ import { useTranslations } from "next-intl"; -import { ThemeChanger } from "../components/core/ThemeChanger"; +import { ThemeChanger } from "@/components/core/ThemeChanger"; export default function Home() { const t = useTranslations("HomePage"); diff --git a/src/app/[locale]/sign-in/page.tsx b/src/app/[locale]/sign-in/page.tsx new file mode 100644 index 0000000..26fe1f4 --- /dev/null +++ b/src/app/[locale]/sign-in/page.tsx @@ -0,0 +1,20 @@ +import { AuthForm } from '@/components/auth/AuthForm'; +import { routes } from '@/lib/routes'; + +type SignInPageProps = { + searchParams: Promise<{ + callbackURL?: string | string[]; + }>; +}; + +export default async function SignInPage({ searchParams }: SignInPageProps) { + const params = await searchParams; + const callbackURL = Array.isArray(params.callbackURL) + ? params.callbackURL[0] + : params.callbackURL; + const redirectPath = callbackURL?.startsWith('/') + ? callbackURL + : routes.private.dashboard; + + return ; +} diff --git a/src/app/sign-in/page.tsx b/src/app/sign-in/page.tsx deleted file mode 100644 index 36b664f..0000000 --- a/src/app/sign-in/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { AuthForm } from '@/components/auth/AuthForm'; - -export default function SignInPage() { - return ; -} diff --git a/src/app/sign-up/page.tsx b/src/app/sign-up/page.tsx deleted file mode 100644 index f474d30..0000000 --- a/src/app/sign-up/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { AuthForm } from '@/components/auth/AuthForm'; - -export default function SignUpPage() { - return ; -}