diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx index 501c428e7ab7e..7d5d0f445a42b 100644 --- a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx +++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx @@ -5,7 +5,7 @@ import { useMemo, useState } from 'react'; import { Controller } from 'react-hook-form'; import { useRecoilState, useRecoilValue } from 'recoil'; import { Key } from 'ts-key-enum'; -import { IconGoogle, IconKey, IconMicrosoft } from 'twenty-ui'; +import { IconGoogle, IconMicrosoft } from 'twenty-ui'; import { FooterNote } from '@/auth/sign-in-up/components/FooterNote'; import { HorizontalSeparator } from '@/auth/sign-in-up/components/HorizontalSeparator'; @@ -61,18 +61,18 @@ export const SignInUpForm = () => { signInUpMode, continueWithCredentials, continueWithEmail, - continueWithSSO, + // continueWithSSO, submitCredentials, submitSSOEmail, } = useSignInUp(form); - const toggleSSOMode = () => { - if (signInUpStep === SignInUpStep.EmailSSO) { - continueWithEmail(); - } else { - continueWithSSO(); - } - }; + // const toggleSSOMode = () => { + // if (signInUpStep === SignInUpStep.EmailSSO) { + // continueWithEmail(); + // } else { + // continueWithSSO(); + // } + // }; const handleKeyDown = async ( event: React.KeyboardEvent, @@ -160,16 +160,16 @@ export const SignInUpForm = () => { )} - } - title={ - signInUpStep === SignInUpStep.EmailSSO - ? 'Continue with email' - : 'Single sign-on (SSO)' - } - onClick={toggleSSOMode} - fullWidth - /> + {/* }*/} + {/* title={*/} + {/* signInUpStep === SignInUpStep.EmailSSO*/} + {/* ? 'Continue with email'*/} + {/* : 'Single sign-on (SSO)'*/} + {/* }*/} + {/* onClick={toggleSSOMode}*/} + {/* fullWidth*/} + {/*/>*/} {authProviders.password && @@ -277,60 +277,60 @@ export const SignInUpForm = () => { /> )} - {/* {*/} - {/* event.preventDefault();*/} - {/* }}*/} - {/*>*/} - {/* {signInUpStep === SignInUpStep.EmailSSO && (*/} - {/* <>*/} - {/* */} - {/* (*/} - {/* */} - {/* */} - {/* */} - {/* )}*/} - {/* />*/} - {/* */} - {/* {*/} - {/* setShowErrors(true);*/} - {/* submitSSOEmail(form.getValues('email'));*/} - {/* }}*/} - {/* Icon={() => form.formState.isSubmitting && }*/} - {/* disabled={isSubmitButtonDisabled}*/} - {/* fullWidth*/} - {/* />*/} - {/* */} - {/* )}*/} - {/**/} + { + event.preventDefault(); + }} + > + {signInUpStep === SignInUpStep.EmailSSO && ( + <> + + ( + + + + )} + /> + + { + setShowErrors(true); + submitSSOEmail(form.getValues('email')); + }} + Icon={() => form.formState.isSubmitting && } + disabled={isSubmitButtonDisabled} + fullWidth + /> + + )} + {signInUpStep === SignInUpStep.Password && ( diff --git a/packages/twenty-front/src/pages/auth/SignInUp.tsx b/packages/twenty-front/src/pages/auth/SignInUp.tsx index 29e0a29e5eafd..d9eefac9ed390 100644 --- a/packages/twenty-front/src/pages/auth/SignInUp.tsx +++ b/packages/twenty-front/src/pages/auth/SignInUp.tsx @@ -11,6 +11,7 @@ import { AnimatedEaseIn } from '@/ui/utilities/animation/components/AnimatedEase import { isDefined } from '~/utils/isDefined'; import { SignInUpStep } from '@/auth/states/signInUpStepState'; import { IconLockCustom } from '@ui/display/icon/components/IconLock'; +import { SSOWorkspaceSelection } from './SSOWorkspaceSelection'; export const SignInUp = () => { const { form } = useSignInUpForm(); @@ -47,11 +48,11 @@ export const SignInUp = () => { )} {title} - {/*{signInUpStep === SignInUpStep.SSOWorkspaceSelection ? (*/} - {/* */} - {/*) : (*/} - - {/*)}*/} + {signInUpStep === SignInUpStep.SSOWorkspaceSelection ? ( + + ) : ( + + )} ); };