feat(sign-in): add icons, use ghost variant and sm size for header buttons

This commit is contained in:
2026-04-08 00:56:13 -04:00
parent 59bc8fee38
commit 8ee5688168

View File

@@ -1,5 +1,6 @@
"use client"; "use client";
import { LogIn, LogOut } from "lucide-react";
import { useRouter } from "next/navigation"; import { useRouter } from "next/navigation";
import { toast } from "sonner"; import { toast } from "sonner";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
@@ -19,25 +20,31 @@ export default function SignIn() {
}; };
if (isPending) { if (isPending) {
return <div className="h-8 w-16 bg-muted animate-pulse rounded"></div>; return <div className="h-8 w-16 bg-muted animate-pulse rounded-md" />;
} }
if (session?.user) { if (session?.user) {
return ( return (
<div className="flex items-center gap-4"> <Button
<Button onClick={handleSignOut} variant="ghost" size="default"> onClick={handleSignOut}
Sign Out variant="ghost"
</Button> size="sm"
</div> className="h-8 text-xs text-muted-foreground"
>
<LogOut className="h-3.5 w-3.5 mr-1.5" />
Sign Out
</Button>
); );
} }
return ( return (
<Button <Button
onClick={() => router.push("/auth/signin")} onClick={() => router.push("/auth/signin")}
variant="outline" variant="ghost"
size="default" size="sm"
className="h-8 text-xs"
> >
<LogIn className="h-3.5 w-3.5 mr-1.5" />
Sign In Sign In
</Button> </Button>
); );