mirror of
https://gitlab.massbug.com/massbug/judge4c.git
synced 2025-07-04 12:02:14 +00:00
refactor(auth): update sign-in and sign-up pages to use server-side authentication
This commit is contained in:
parent
40636d2d52
commit
32f52945de
@ -1,8 +1,12 @@
|
|||||||
"use client";
|
import { redirect } from "next/navigation";
|
||||||
|
import { getCurrent } from "@/features/auth/actions";
|
||||||
import { SignInCard } from "@/features/auth/components/sign-in-card";
|
import { SignInCard } from "@/features/auth/components/sign-in-card";
|
||||||
|
|
||||||
const SignInPage = () => {
|
const SignInPage = async () => {
|
||||||
|
const user = await getCurrent();
|
||||||
|
|
||||||
|
if (user) redirect("/");
|
||||||
|
|
||||||
return <SignInCard />;
|
return <SignInCard />;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
"use client";
|
import { redirect } from "next/navigation";
|
||||||
|
import { getCurrent } from "@/features/auth/actions";
|
||||||
import { SignUpCard } from "@/features/auth/components/sign-up-card";
|
import { SignUpCard } from "@/features/auth/components/sign-up-card";
|
||||||
|
|
||||||
const SignUpPage = () => {
|
const SignUpPage = async () => {
|
||||||
|
const user = await getCurrent();
|
||||||
|
|
||||||
|
if (user) redirect("/");
|
||||||
|
|
||||||
return <SignUpCard />;
|
return <SignUpCard />;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user