fix type error in <Shell> Userdropdown (#980)
* removed settings from bottom nav * truncate bottom nav * fixed type error in Shell
This commit is contained in:
parent
4d5b5663c0
commit
415d5fe8bd
1 changed files with 82 additions and 87 deletions
|
@ -298,18 +298,14 @@ function UserDropdown({ small }: { small?: boolean }) {
|
|||
const query = useMeQuery();
|
||||
const user = query.data;
|
||||
|
||||
return (
|
||||
!!user && (
|
||||
return user ? (
|
||||
<Dropdown>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<div className="flex items-center space-x-2 cursor-pointer group">
|
||||
<Avatar
|
||||
imageSrc={user.avatar}
|
||||
alt={user.username}
|
||||
className={classNames(
|
||||
small ? "w-8 h-8" : "w-10 h-10",
|
||||
"bg-gray-300 rounded-full flex-shrink-0"
|
||||
)}
|
||||
className={classNames(small ? "w-8 h-8" : "w-10 h-10", "bg-gray-300 rounded-full flex-shrink-0")}
|
||||
/>
|
||||
{!small && (
|
||||
<>
|
||||
|
@ -385,6 +381,5 @@ function UserDropdown({ small }: { small?: boolean }) {
|
|||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</Dropdown>
|
||||
)
|
||||
);
|
||||
) : null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue