Skip to content

Commit

Permalink
Merge pull request #96 from Tps-F/logout
Browse files Browse the repository at this point in the history
  • Loading branch information
Tps-F authored Oct 13, 2023
2 parents f120092 + 3214076 commit 79ef6fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 79ef6fb

Please sign in to comment.