Skip to content

Commit

Permalink
fix: 🐛 fixed a code error caused by rule of hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
neopromic committed Nov 27, 2024
1 parent 91c6695 commit b0e7dbc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/_components/user-avatar-button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable react-hooks/rules-of-hooks */
"use client";

import { redirect } from "next/navigation";
Expand All @@ -16,6 +15,7 @@ import { useRouter } from "next/navigation";
const UserAvatarButton = () => {
const { user } = useUser();
const { signOut } = useClerk();
const router = useRouter();

const handleLogout = async () => {
await signOut();
Expand All @@ -28,8 +28,6 @@ const UserAvatarButton = () => {
return null;
}

const router = useRouter();

return (
<>
<DropdownMenu>
Expand Down

0 comments on commit b0e7dbc

Please sign in to comment.