chore: rename unique code auth form.

This commit is contained in:
Prateek Shourya 2024-05-01 13:59:11 +05:30
parent 86196c38bc
commit ce4cc7f2cf
2 changed files with 4 additions and 4 deletions

View File

@ -10,10 +10,10 @@ import {
AuthHeader,
AuthBanner,
AuthEmailForm,
AuthUniqueCodeForm,
AuthPasswordForm,
OAuthOptions,
TermsAndConditions,
UniqueCodeForm,
} from "@/components/account";
// helpers
import {
@ -63,7 +63,7 @@ export const SignUpAuthRoot: FC = observer(() => {
await authService
.signUpEmailCheck(data)
.then(() => {
if (isSmtpConfigured) setAuthStep(EAuthSteps.UNIQUE_CODE);
if (isSmtpConfigured) setAuthStep(EAuthSteps.PASSWORD);
else setAuthStep(EAuthSteps.PASSWORD);
})
.catch((error) => {
@ -105,7 +105,7 @@ export const SignUpAuthRoot: FC = observer(() => {
)}
{authStep === EAuthSteps.EMAIL && <AuthEmailForm defaultEmail={email} onSubmit={handleEmailVerification} />}
{authStep === EAuthSteps.UNIQUE_CODE && (
<UniqueCodeForm
<AuthUniqueCodeForm
email={email}
handleEmailClear={() => {
setEmail("");

View File

@ -30,7 +30,7 @@ const defaultValues: TUniqueCodeFormValues = {
// services
const authService = new AuthService();
export const UniqueCodeForm: React.FC<Props> = (props) => {
export const AuthUniqueCodeForm: React.FC<Props> = (props) => {
const { email, handleEmailClear, submitButtonText, mode } = props;
// states
const [uniqueCodeFormData, setUniqueCodeFormData] = useState<TUniqueCodeFormValues>({ ...defaultValues, email });