ref: move to auth page to an component
This commit is contained in:
parent
e257940129
commit
8806c38320
@ -1,7 +1,7 @@
|
||||
"use client"
|
||||
import { signIn, signOut, useSession } from "next-auth/react";
|
||||
|
||||
const LoginPage = () => {
|
||||
const Auth = () => {
|
||||
const { data: session } = useSession();
|
||||
|
||||
return (
|
||||
@ -26,7 +26,7 @@ const LoginPage = () => {
|
||||
borderRadius: "5px",
|
||||
cursor: "pointer",
|
||||
}}
|
||||
onClick={() => signIn("discord")} // Modifier selon votre provider
|
||||
onClick={() => signIn("discord")}
|
||||
>
|
||||
Sign in with Discord
|
||||
</button>
|
||||
@ -53,4 +53,4 @@ const LoginPage = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export default LoginPage;
|
||||
export default Auth;
|
@ -1,10 +1,11 @@
|
||||
"use client";
|
||||
import Auth from "./components/Auth";
|
||||
import FetchWithSession from "./components/FetchWithSession";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<>
|
||||
<h1>Home</h1>
|
||||
<Auth />
|
||||
<FetchWithSession />
|
||||
</>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user