Fix sign out button

This commit is contained in:
Gabriel Brown 2024-06-13 16:46:15 -05:00
parent a64cc1bab7
commit cb42ebf5d1
2 changed files with 21 additions and 3 deletions

View File

@ -1,5 +1,5 @@
import { Button } from "~/components/ui/button"; import { Button } from "~/components/ui/button";
import { SignInGH } from "~/app/_components/auth/sign_in_gh"; import { SignInQuick } from "~/app/_components/ui/sign_in_quick_settings";
import { CiPower } from "react-icons/ci"; import { CiPower } from "react-icons/ci";
import { AiFillSound } from "react-icons/ai"; import { AiFillSound } from "react-icons/ai";
import { FaNetworkWired } from "react-icons/fa"; import { FaNetworkWired } from "react-icons/fa";
@ -31,8 +31,8 @@ export function Quick_Settings() {
<DropdownMenuItem className="rounded-full bg-gray-800 mr-10 ml-2"> <DropdownMenuItem className="rounded-full bg-gray-800 mr-10 ml-2">
<IoIosSettings className="w-8 h-8" /> <IoIosSettings className="w-8 h-8" />
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem className="rounded-full bg-gray-800 w-20 h-20 justify-center"> <DropdownMenuItem className="rounded-full bg-gray-800 ml-2">
<SignInGH /> < SignInQuick />
</DropdownMenuItem> </DropdownMenuItem>
</div> </div>
</div> </div>

View File

@ -0,0 +1,18 @@
import { signIn, signOut, auth } from "~/auth"
import { CiPower } from "react-icons/ci";
import Image from "next/image";
export async function SignInQuick() {
const session = await auth();
return (
<form
action={async () => {
"use server";
await signOut();
}}>
<button type="submit">
<CiPower className="w-8 h-8 pt-1" />
</button>
</form>
);
}