import { FC, ReactNode } from "react"; // layouts import { observer } from "mobx-react-lite"; import useSWR from "swr"; import { CommandPalette } from "components/command-palette"; import { EIssuesStoreType } from "constants/issue"; import { useIssues } from "hooks/store/use-issues"; import { UserAuthWrapper, WorkspaceAuthWrapper, ProjectAuthWrapper } from "layouts/auth-layout"; // components import { AppSidebar } from "./sidebar"; export interface IAppLayout { children: ReactNode; header: ReactNode; withProjectWrapper?: boolean; } export const AppLayout: FC = observer((props) => { const { children, header, withProjectWrapper = false } = props; return ( <>
{header}
{withProjectWrapper ? {children} : <>{children}}
); });