logout button bug fixed
This commit is contained in:
@@ -5,13 +5,17 @@ const SubMenuLink = ({
|
||||
logOut,
|
||||
}: {
|
||||
item: MenuItem;
|
||||
logOut: () => void;
|
||||
logOut?: () => void;
|
||||
}) => {
|
||||
return (
|
||||
<a
|
||||
className="flex flex-row gap-4 rounded-md p-3 leading-none no-underline transition-colors outline-none select-none hover:bg-muted hover:text-accent-foreground"
|
||||
href={item.url}
|
||||
onClick={logOut}
|
||||
onClick={() => {
|
||||
if (logOut) {
|
||||
logOut();
|
||||
}
|
||||
}}
|
||||
>
|
||||
<div className="text-foreground">
|
||||
{item.icon && <item.icon className="size-5 shrink-0" />}
|
||||
|
||||
Reference in New Issue
Block a user