mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
refactor(avatar-button): replace sign-in handler with redirect to /sign-in
This commit is contained in:
parent
e6e5ea98ea
commit
47c219bc4a
@ -17,7 +17,8 @@ import {
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuTrigger,
|
||||
} from "@/components/ui/dropdown-menu";
|
||||
import { auth, signIn, signOut } from "@/lib/auth";
|
||||
import { auth, signOut } from "@/lib/auth";
|
||||
import { redirect } from "next/navigation";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
import { SettingsButton } from "@/components/settings-button";
|
||||
|
||||
@ -30,7 +31,7 @@ const UserAvatar = ({ image, name }: { image: string; name: string }) => (
|
||||
|
||||
async function handleSignIn() {
|
||||
"use server";
|
||||
await signIn("github");
|
||||
redirect("/sign-in");
|
||||
}
|
||||
|
||||
async function handleSignOut() {
|
||||
|
Loading…
Reference in New Issue
Block a user