Update path in script
This commit is contained in:
15
src/components/auth/client/Sign_In.tsx
Normal file
15
src/components/auth/client/Sign_In.tsx
Normal file
@ -0,0 +1,15 @@
|
||||
import { signIn } from "next-auth/react";
|
||||
import { Button } from "~/components/ui/shadcn/button";
|
||||
|
||||
export default function Sign_In() {
|
||||
return (
|
||||
<Button
|
||||
onClick={() => signIn()}
|
||||
className="bg-gradient-to-tl from-[#35363F] to=[#24191A] rounded-xl
|
||||
px-4 py-2 md:py-2.5 font-semibold text-white hover:bg-gradient-to-tr
|
||||
hover:from-[#35363F] hover:to-[#23242F]"
|
||||
>
|
||||
<h1 className="md:text-2xl my-auto font-semibold">Sign In</h1>
|
||||
</Button>
|
||||
);
|
||||
};
|
21
src/components/auth/server/Sign_In.tsx
Normal file
21
src/components/auth/server/Sign_In.tsx
Normal file
@ -0,0 +1,21 @@
|
||||
import Image from "next/image";
|
||||
import { signIn } from "~/auth";
|
||||
|
||||
export default async function Sign_In() {
|
||||
return (
|
||||
<form className="items-center justify-center mx-auto"
|
||||
action={async () => {
|
||||
"use server";
|
||||
await signIn("microsoft-entra-id");
|
||||
}}>
|
||||
<button type="submit" className="flex flex-row mx-auto
|
||||
bg-gradient-to-tl from-[#35363F] to=[#24191A] rounded-xl px-4 py-2 md:py-2.5
|
||||
font-semibold text-white hover:bg-gradient-to-tr hover:from-[#35363F] hover:to-[#23242F]">
|
||||
<Image src="/images/microsoft_logo.png" alt="Microsoft" width={35} height={35}
|
||||
className="mr-2"
|
||||
/>
|
||||
<h1 className="md:text-2xl my-auto font-semibold">Sign In</h1>
|
||||
</button>
|
||||
</form>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user