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