Skip to content

Commit

Permalink
logout user
Browse files Browse the repository at this point in the history
  • Loading branch information
Tps-F committed Oct 13, 2023
1 parent f120092 commit 0871137
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ import {
} from "@/components/ui/alert-dialog";
import Link from "next/link";
import { useTranslations } from 'next-intl';
import { useAuth } from "@/hooks/auth";

export const AvatarButton = () => {
const t = useTranslations('Dashboard');

const { logoutUser } = useAuth()
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
Expand Down Expand Up @@ -59,7 +60,7 @@ export const AvatarButton = () => {
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem className="gap-x-2">
<LogOut className="w-4 h-4" />
<LogOut className="w-4 h-4" onClick={() => logoutUser()}/>
ログアウト
</DropdownMenuItem>
</DropdownMenuContent>
Expand Down

0 comments on commit 0871137

Please sign in to comment.