2023-10-02 19:03:03 +00:00
|
|
|
import { FC, ReactNode } from "react";
|
|
|
|
// layouts
|
|
|
|
import { UserAuthWrapper, WorkspaceAuthWrapper } from "layouts/auth-layout";
|
|
|
|
// components
|
|
|
|
import { CommandPalette } from "components/command-palette";
|
|
|
|
import { AppSidebar } from "./sidebar";
|
|
|
|
|
|
|
|
export interface IAppLayout {
|
|
|
|
children: ReactNode;
|
2023-10-11 08:27:47 +00:00
|
|
|
header: ReactNode;
|
2023-10-02 19:03:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export const AppLayout: FC<IAppLayout> = (props) => {
|
2023-10-11 08:27:47 +00:00
|
|
|
const { children, header } = props;
|
2023-10-02 19:03:03 +00:00
|
|
|
return (
|
|
|
|
<div>
|
2023-10-11 08:27:47 +00:00
|
|
|
{/* <CommandPalette /> */}
|
2023-10-02 19:03:03 +00:00
|
|
|
<UserAuthWrapper>
|
|
|
|
<WorkspaceAuthWrapper>
|
2023-10-11 08:27:47 +00:00
|
|
|
<div className="flex w-full h-full">
|
2023-10-02 19:03:03 +00:00
|
|
|
<AppSidebar />
|
2023-10-11 08:27:47 +00:00
|
|
|
<div className="relative flex flex-col h-screen w-full overflow-hidden">
|
|
|
|
<div className="w-full">{header}</div>
|
|
|
|
<main className={`relative flex h-full w-full flex-col overflow-hidden bg-custom-background-100`}>
|
2023-10-02 19:03:03 +00:00
|
|
|
<div className="h-full w-full overflow-hidden">
|
|
|
|
<div className="relative h-full w-full overflow-x-hidden overflow-y-scroll">{children}</div>
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</WorkspaceAuthWrapper>
|
|
|
|
</UserAuthWrapper>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|