make the navbar move around less
All checks were successful
Deploy Website / deploy (push) Successful in 4m59s
All checks were successful
Deploy Website / deploy (push) Successful in 4m59s
This commit is contained in:
parent
b5ae8a8ae0
commit
2367a03516
@ -15,9 +15,6 @@ export default function FriendsButton() {
|
|||||||
|
|
||||||
const database = useDatabase();
|
const database = useDatabase();
|
||||||
const friends = useLiveQuery(() => database.getFriends());
|
const friends = useLiveQuery(() => database.getFriends());
|
||||||
if (friends == undefined) {
|
|
||||||
return; // Friends haven't loaded yet
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Popover open={open} onOpenChange={setOpen}>
|
<Popover open={open} onOpenChange={setOpen}>
|
||||||
@ -28,7 +25,7 @@ export default function FriendsButton() {
|
|||||||
</NavbarButton>
|
</NavbarButton>
|
||||||
</PopoverTrigger>
|
</PopoverTrigger>
|
||||||
<PopoverContent className="p-2">
|
<PopoverContent className="p-2">
|
||||||
{friends.length > 0 ? (
|
{friends && friends.length > 0 ? (
|
||||||
friends.map(friend => <Friend player={friend} key={friend.id} onClick={() => setOpen(false)} />)
|
friends.map(friend => <Friend player={friend} key={friend.id} onClick={() => setOpen(false)} />)
|
||||||
) : (
|
) : (
|
||||||
<div className="text-sm flex flex-col gap-2 justify-center items-center">
|
<div className="text-sm flex flex-col gap-2 justify-center items-center">
|
||||||
|
Reference in New Issue
Block a user