mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 02:33:01 +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>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
<DropdownMenuItem className="flex items-end justify-end p-0 m-0">
|
<DropdownMenuItem className="flex items-end justify-end p-0 m-0">
|
||||||
<LogOutButton noStyle />
|
<LogOutButton noStyle className={"flex w-full justify-end"} />
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
|
|||||||
@@ -3,7 +3,13 @@ import { useNavigate } from "react-router-dom";
|
|||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { cn } from "@/lib/utils";
|
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 navigate = useNavigate();
|
||||||
|
|
||||||
const logOut = () => {
|
const logOut = () => {
|
||||||
@@ -17,7 +23,7 @@ export default function LogOutButton({ noStyle = false }: { noStyle?: boolean })
|
|||||||
<Button
|
<Button
|
||||||
onClick={logOut}
|
onClick={logOut}
|
||||||
variant={noStyle ? "dummy" : "destructive"}
|
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"}
|
size={noStyle ? "none" : "default"}
|
||||||
>
|
>
|
||||||
Log out
|
Log out
|
||||||
|
|||||||
3
todo.md
3
todo.md
@@ -1,5 +1,4 @@
|
|||||||
- user settings/profile page
|
- user settings/profile page
|
||||||
- create issue
|
- create issue
|
||||||
- add user(s) to project
|
- add/invite user(s) to org
|
||||||
- rename Project.blob to Project.key
|
- rename Project.blob to Project.key
|
||||||
- pressing on the left side of log out button does nothing (in user menu)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user