alternative tangled frontend (extremely wip)
1import { useNavigate } from "@tanstack/react-router";
2import { LucideLogOut } from "lucide-react";
3import { Button } from "@/components/Animated/Button";
4import { useOAuth } from "@/lib/oauth";
5
6export const SignOutButton = () => {
7 const { signOut } = useOAuth();
8 const navigate = useNavigate();
9
10 const handleSignOut = () => {
11 signOut();
12 navigate({ to: "/" });
13 };
14
15 return (
16 <Button
17 icon={<LucideLogOut height={16} width={16} />}
18 label="Sign Out"
19 className="hover:bg-surface1 cursor-pointer rounded-b-sm p-2 pl-4 transition-all"
20 labelClassName="text-sm text-negative"
21 onClick={handleSignOut}
22 iconTransitions={{ duration: 0.2, ease: "easeInOut" }}
23 iconVariants={{
24 active: {
25 x: [0, 3, -3, 0],
26 opacity: [1, 0, 0, 1],
27 },
28 }}
29 iconClassName="text-negative"
30 underlineClassName="bg-negative"
31 />
32 );
33};