2023-11-29 15:03:08 +00:00
|
|
|
import { useState } from "react";
|
|
|
|
// components
|
|
|
|
import { LatestFeatureBlock } from "components/common";
|
2023-12-06 08:52:59 +00:00
|
|
|
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-01 10:20:01 +00:00
|
|
|
<div className="h-full bg-onboarding-gradient-100 md:w-2/3 sm:w-4/5 px-4 pt-4 rounded-t-md mx-auto shadow-sm border-x border-t border-custom-border-200">
|
|
|
|
<div className="bg-onboarding-gradient-200 h-full pt-24 pb-56 rounded-t-md overflow-auto">
|
|
|
|
<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>
|
|
|
|
)}
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|