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 <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
ed6a17fe4b
commit
65e91fc6f6
4 changed files with 21 additions and 11 deletions
|
|
@ -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");
|
||||
20
src/app/[locale]/sign-in/page.tsx
Normal file
20
src/app/[locale]/sign-in/page.tsx
Normal file
|
|
@ -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 <AuthForm mode="sign-in" redirectPath={redirectPath} />;
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
import { AuthForm } from '@/components/auth/AuthForm';
|
||||
|
||||
export default function SignInPage() {
|
||||
return <AuthForm mode="sign-in" />;
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
import { AuthForm } from '@/components/auth/AuthForm';
|
||||
|
||||
export default function SignUpPage() {
|
||||
return <AuthForm mode="sign-up" />;
|
||||
}
|
||||
Loading…
Reference in a new issue