Skip to content

Commit

Permalink
adding back a missing loading check
Browse files Browse the repository at this point in the history
  • Loading branch information
fforres committed Apr 10, 2024
1 parent 044b9a1 commit 5ea82ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Navbar/MobileNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import { useState } from "react";
import { Button, buttonVariants } from "@/components/ui/button";
import { ScrollArea } from "@/components/ui/scroll-area";
import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet";
import { useIsLoggedIn } from "@/utils/supabase/AuthProvider";
import { useIsAuthReady, useIsLoggedIn } from "@/utils/supabase/AuthProvider";
import { MobileLink } from "./MobileLink";
import { MobileNavbarItem } from "./MobileNavbarItem";
import { NavBarProps } from "./types";

export function MobileNav({ items }: NavBarProps) {
const [open, setOpen] = useState(false);
const isLoggedIn = useIsLoggedIn();

const isReady = useIsAuthReady();
return (
<Sheet open={open} onOpenChange={setOpen}>
<SheetTrigger asChild>
Expand Down Expand Up @@ -45,7 +45,7 @@ export function MobileNav({ items }: NavBarProps) {
setOpen={setOpen}
/>
))}
{!isLoggedIn ? (
{isReady && !isLoggedIn ? (
<Link
className={buttonVariants({})}
href="/login"
Expand Down

0 comments on commit 5ea82ba

Please sign in to comment.