import useEntities from "@/hooks/useEntities"; import { EntityWithRoles } from "@/interfaces/entity"; import { User } from "@/interfaces/user"; import clsx from "clsx"; import { useRouter } from "next/router"; import { ToastContainer } from "react-toastify"; import Navbar from "../Navbar"; import Sidebar from "../Sidebar"; interface Props { user: User; entities?: EntityWithRoles[] children: React.ReactNode; className?: string; navDisabled?: boolean; focusMode?: boolean; hideSidebar?: boolean bgColor?: string; onFocusLayerMouseEnter?: () => void; } export default function Layout({ user, children, className, bgColor = "bg-white", hideSidebar, navDisabled = false, focusMode = false, onFocusLayerMouseEnter }: Props) { const router = useRouter(); const { entities } = useEntities() return (
{!hideSidebar && user && ( )}
{!hideSidebar && user && ( )}
{children}
); }