fix: pressing on the left side of log out button does nothing (in user menu)

This commit is contained in:
Oliver Bryan
2025-12-29 06:00:38 +00:00
parent f3aa9f84fa
commit 54493f7c60
3 changed files with 10 additions and 5 deletions

View File

@@ -285,7 +285,7 @@ function Index() {
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem className="flex items-end justify-end p-0 m-0">
<LogOutButton noStyle />
<LogOutButton noStyle className={"flex w-full justify-end"} />
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>

View File

@@ -3,7 +3,13 @@ import { useNavigate } from "react-router-dom";
import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils";
export default function LogOutButton({ noStyle = false }: { noStyle?: boolean }) {
export default function LogOutButton({
noStyle = false,
className,
}: {
noStyle?: boolean;
className?: string;
}) {
const navigate = useNavigate();
const logOut = () => {
@@ -17,7 +23,7 @@ export default function LogOutButton({ noStyle = false }: { noStyle?: boolean })
<Button
onClick={logOut}
variant={noStyle ? "dummy" : "destructive"}
className={cn("flex gap-2 items-center", noStyle && "px-2 py-1 m-0 h-auto")}
className={cn("flex gap-2 items-center", noStyle && "px-2 py-1 m-0 h-auto", className)}
size={noStyle ? "none" : "default"}
>
Log out

View File

@@ -1,5 +1,4 @@
- user settings/profile page
- create issue
- add user(s) to project
- add/invite user(s) to org
- rename Project.blob to Project.key
- pressing on the left side of log out button does nothing (in user menu)