2023-11-29 15:03:08 +00:00
|
|
|
import { useState } from "react";
|
|
|
|
// components
|
2024-03-19 14:38:35 +00:00
|
|
|
import { LatestFeatureBlock } from "@/components/common";
|
|
|
|
import { InstanceSetupDone, InstanceSetupSignInForm } from "@/components/instance";
|
2023-11-29 15:03:08 +00:00
|
|
|
|
|
|
|
export enum EInstanceSetupSteps {
|
2023-12-06 08:52:59 +00:00
|
|
|
SIGN_IN = "SIGN_IN",
|
2023-11-29 15:03:08 +00:00
|
|
|
DONE = "DONE",
|
|
|
|
}
|
|
|
|
|
|
|
|
export const InstanceSetupFormRoot = () => {
|
|
|
|
// states
|
2023-12-06 08:52:59 +00:00
|
|
|
const [setupStep, setSetupStep] = useState(EInstanceSetupSteps.SIGN_IN);
|
2023-11-29 15:03:08 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
2023-12-06 08:52:59 +00:00
|
|
|
{setupStep === EInstanceSetupSteps.DONE && <InstanceSetupDone />}
|
|
|
|
{setupStep === EInstanceSetupSteps.SIGN_IN && (
|
2023-12-10 10:18:10 +00:00
|
|
|
<div className="mx-auto h-full rounded-t-md border-x border-t border-custom-border-200 bg-onboarding-gradient-100 px-4 pt-4 shadow-sm sm:w-4/5 md:w-2/3">
|
|
|
|
<div className="h-full overflow-auto rounded-t-md bg-onboarding-gradient-200 pb-56 pt-24">
|
2023-12-01 10:20:01 +00:00
|
|
|
<div className="mx-auto flex flex-col">
|
2023-12-06 08:52:59 +00:00
|
|
|
<InstanceSetupSignInForm handleNextStep={() => setSetupStep(EInstanceSetupSteps.DONE)} />
|
2023-11-29 15:03:08 +00:00
|
|
|
</div>
|
|
|
|
<LatestFeatureBlock />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|