Skip to content

Commit 12d4d9e

Browse files
committed
fixed mobile view logout button
1 parent 458ad90 commit 12d4d9e

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

components/logout-button.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"use client";
22

3+
import { LogOut } from "lucide-react";
34
import { useRouter } from "next/navigation";
45

56
import { Button } from "@/components/ui/button";
@@ -16,5 +17,14 @@ export function LogoutButton() {
1617
router.refresh();
1718
};
1819

19-
return <Button onClick={logout}>Logout</Button>;
20+
return (
21+
<Button
22+
onClick={logout}
23+
aria-label="Logout"
24+
className="h-10 w-10 shrink-0 px-0 sm:w-auto sm:px-4"
25+
>
26+
<LogOut aria-hidden="true" className="sm:hidden" />
27+
<span className="hidden sm:inline">Logout</span>
28+
</Button>
29+
);
2030
}

0 commit comments

Comments
 (0)