show pages to unauthenticated user

This commit is contained in:
João Geonizeli
2021-09-13 20:54:58 -03:00
parent d6b6b997d5
commit 5b1dc56837
7 changed files with 32 additions and 29 deletions

View File

@@ -4,7 +4,6 @@ import { Transition } from "@headlessui/react";
import cs from "classnames";
import { useApp } from "../../contexts/AppProvider";
import { useCurrentUser } from "../../contexts/UserProvider";
type MenuItem = {
label: string;
@@ -39,7 +38,6 @@ const MenuItems: MenuItem[] = [
];
export const SideNav = () => {
const { isAuthenticated } = useCurrentUser();
const { sideNavExpanded, setSideNavExpanded } = useApp();
const location = useLocation();
@@ -53,8 +51,6 @@ export const SideNav = () => {
}
};
if (!isAuthenticated) return null;
return (
<>
<Transition