2023-11-18 10:47:01 +00:00
|
|
|
import { FC, ReactNode } from "react";
|
|
|
|
// layouts
|
2023-11-20 15:16:49 +00:00
|
|
|
import { AdminAuthWrapper, UserAuthWrapper } from "layouts/auth-layout";
|
2023-11-18 10:47:01 +00:00
|
|
|
// components
|
|
|
|
import { InstanceAdminSidebar } from "./sidebar";
|
2023-11-25 15:53:50 +00:00
|
|
|
import { InstanceAdminHeader } from "./header";
|
2023-11-18 10:47:01 +00:00
|
|
|
|
|
|
|
export interface IInstanceAdminLayout {
|
|
|
|
children: ReactNode;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const InstanceAdminLayout: FC<IInstanceAdminLayout> = (props) => {
|
2023-11-25 15:53:50 +00:00
|
|
|
const { children } = props;
|
2023-11-18 10:47:01 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<UserAuthWrapper>
|
2023-11-20 15:16:49 +00:00
|
|
|
<AdminAuthWrapper>
|
|
|
|
<div className="relative flex h-screen w-full overflow-hidden">
|
|
|
|
<InstanceAdminSidebar />
|
|
|
|
<main className="relative flex flex-col h-full w-full overflow-hidden bg-custom-background-100">
|
2023-11-25 15:53:50 +00:00
|
|
|
<InstanceAdminHeader />
|
2023-11-20 15:16:49 +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>
|
2023-11-18 10:47:01 +00:00
|
|
|
</div>
|
2023-11-20 15:16:49 +00:00
|
|
|
</main>
|
|
|
|
</div>
|
|
|
|
</AdminAuthWrapper>
|
2023-11-18 10:47:01 +00:00
|
|
|
</UserAuthWrapper>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|