dev: instance setup workflow (#2935)

* chore: instance type updated

* chore: instance not ready screen added

* chore: instance layout added

* chore: instance magic sign in endpoint and type added

* chore: instance admin password endpoint added

* chore: instance setup page added

* chore: instance setup form added

* chore: instance layout updated

* fix: instance admin workflow setup

* fix: admin workflow setup

---------

Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
This commit is contained in:
Anmol Singh Bhatia 2023-11-29 20:33:08 +05:30 committed by sriram veeraghanta
parent ee30eb0590
commit fd5b7d20a8
25 changed files with 905 additions and 38 deletions

View file

@ -4,6 +4,9 @@ import { AdminAuthWrapper, UserAuthWrapper } from "layouts/auth-layout";
// components
import { InstanceAdminSidebar } from "./sidebar";
import { InstanceAdminHeader } from "./header";
import { InstanceSetupView } from "components/instance";
// store
import { useMobxStore } from "lib/mobx/store-provider";
export interface IInstanceAdminLayout {
children: ReactNode;
@ -11,6 +14,18 @@ export interface IInstanceAdminLayout {
export const InstanceAdminLayout: FC<IInstanceAdminLayout> = (props) => {
const { children } = props;
// store
const {
instance: { instance },
user: { currentUser },
} = useMobxStore();
// fetch
console.log("instance", instance);
if (instance?.is_setup_done === false) {
return <InstanceSetupView />;
}
return (
<>