mirror of
https://github.com/twentyhq/twenty.git
synced 2024-09-11 15:35:36 +03:00
Added loader in sign-in-up button (#3801)
#3375 added loader in sign-in-up button
This commit is contained in:
parent
8dda4b0b8f
commit
6748dfebc4
@ -5,6 +5,7 @@ import styled from '@emotion/styled';
|
||||
import { motion } from 'framer-motion';
|
||||
|
||||
import { IconGoogle } from '@/ui/display/icon/components/IconGoogle';
|
||||
import { Loader } from '@/ui/feedback/loader/components/Loader';
|
||||
import { MainButton } from '@/ui/input/button/components/MainButton';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { AnimatedEaseIn } from '@/ui/utilities/animation/components/AnimatedEaseIn';
|
||||
@ -85,8 +86,12 @@ export const SignInUpForm = () => {
|
||||
return 'Continue';
|
||||
}
|
||||
|
||||
return signInUpMode === SignInUpMode.SignIn ? 'Sign in' : 'Sign up';
|
||||
}, [signInUpMode, signInUpStep]);
|
||||
return signInUpMode === SignInUpMode.SignIn
|
||||
? 'Sign in'
|
||||
: isSubmitting
|
||||
? 'Creating workspace'
|
||||
: 'Sign up';
|
||||
}, [signInUpMode, signInUpStep, isSubmitting]);
|
||||
|
||||
const title = useMemo(() => {
|
||||
if (signInUpMode === SignInUpMode.Invite) {
|
||||
@ -215,6 +220,7 @@ export const SignInUpForm = () => {
|
||||
setShowErrors(true);
|
||||
handleSubmit(submitCredentials)();
|
||||
}}
|
||||
Icon={() => isSubmitting && <Loader />}
|
||||
disabled={
|
||||
SignInUpStep.Init
|
||||
? false
|
||||
|
Loading…
Reference in New Issue
Block a user