mirror of
https://github.com/hex248/sprint.git
synced 2026-02-07 18:23:03 +00:00
fix: pressing on the left side of log out button does nothing (in user menu)
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user