Skip to content

Commit

Permalink
feat(auth): Consolidate HorizontalSeparator imports
Browse files Browse the repository at this point in the history
Consolidate all HorizontalSeparator imports to 'twenty-ui' instead of local paths. This change simplifies module dependencies and ensures consistency across the sign-in and sign-up components.
  • Loading branch information
AMoreaux committed Nov 15, 2024
1 parent 9d505f0 commit f63f488
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import styled from '@emotion/styled';
import { IconGoogle, IconMicrosoft, Loader, MainButton } from 'twenty-ui';
import { HorizontalSeparator } from '@/auth/sign-in-up/components/HorizontalSeparator';
import {
IconGoogle,
IconMicrosoft,
Loader,
MainButton,
HorizontalSeparator,
} from 'twenty-ui';
import { useTheme } from '@emotion/react';
import { useSignInWithGoogle } from '@/auth/sign-in-up/hooks/useSignInWithGoogle';
import { useSignInWithMicrosoft } from '@/auth/sign-in-up/hooks/useSignInWithMicrosoft';
Expand Down Expand Up @@ -180,7 +185,9 @@ export const SignInUpGlobalScopeForm = () => {
)}

<MainButton
title="Continue"
title={
signInUpStep === SignInUpStep.Password ? 'Sign Up' : 'Continue'
}
type="submit"
variant="secondary"
Icon={() => (form.formState.isSubmitting ? <Loader /> : null)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/* @license Enterprise */

import { HorizontalSeparator } from '@/auth/sign-in-up/components/HorizontalSeparator';
import { useSSO } from '@/auth/sign-in-up/hooks/useSSO';
import { guessSSOIdentityProviderIconByUrl } from '@/settings/security/utils/guessSSOIdentityProviderIconByUrl';
import styled from '@emotion/styled';
import { useRecoilValue } from 'recoil';
import { MainButton } from 'twenty-ui';
import { MainButton, HorizontalSeparator } from 'twenty-ui';

import { isDefined } from '~/utils/isDefined';
import { authProvidersState } from '@/client-config/states/authProvidersState';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import { useRecoilValue } from 'recoil';
import styled from '@emotion/styled';
import { SignInUpPasswordField } from '@/auth/sign-in-up/components/SignInUpPasswordField';
import { useState, useMemo, useEffect } from 'react';
import { useState, useMemo } from 'react';
import { captchaProviderState } from '@/client-config/states/captchaProviderState';
import { isRequestingCaptchaTokenState } from '@/captcha/states/isRequestingCaptchaTokenState';
import { FormProvider } from 'react-hook-form';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { IconGoogle, MainButton } from 'twenty-ui';
import { IconGoogle, MainButton, HorizontalSeparator } from 'twenty-ui';
import {
SignInUpStep,
signInUpStepState,
} from '@/auth/states/signInUpStepState';
import { HorizontalSeparator } from '@/auth/sign-in-up/components/HorizontalSeparator';
import { useTheme } from '@emotion/react';
import { useRecoilValue } from 'recoil';
import { useSignInWithGoogle } from '@/auth/sign-in-up/hooks/useSignInWithGoogle';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { IconMicrosoft, MainButton } from 'twenty-ui';
import { IconMicrosoft, MainButton, HorizontalSeparator } from 'twenty-ui';
import {
SignInUpStep,
signInUpStepState,
} from '@/auth/states/signInUpStepState';
import { useTheme } from '@emotion/react';
import { HorizontalSeparator } from '@/auth/sign-in-up/components/HorizontalSeparator';
import { useSignInWithMicrosoft } from '@/auth/sign-in-up/hooks/useSignInWithMicrosoft';
import { useRecoilValue } from 'recoil';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { IconLock, MainButton } from 'twenty-ui';
import { IconLock, MainButton, HorizontalSeparator } from 'twenty-ui';
import {
SignInUpStep,
signInUpStepState,
} from '@/auth/states/signInUpStepState';
import { HorizontalSeparator } from '@/auth/sign-in-up/components/HorizontalSeparator';
import { useTheme } from '@emotion/react';
import { useRecoilValue, useSetRecoilState } from 'recoil';
import { useSSO } from '@/auth/sign-in-up/hooks/useSSO';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { HorizontalSeparator } from '@/auth/sign-in-up/components/HorizontalSeparator';
import { useHandleResetPassword } from '@/auth/sign-in-up/hooks/useHandleResetPassword';
import { useSignInUp } from '@/auth/sign-in-up/hooks/useSignInUp';
import { useSignInUpForm } from '@/auth/sign-in-up/hooks/useSignInUpForm';
Expand All @@ -7,7 +6,7 @@ import { authProvidersState } from '@/client-config/states/authProvidersState';
import styled from '@emotion/styled';
import { useCallback } from 'react';
import { useRecoilState } from 'recoil';
import { ActionLink } from 'twenty-ui';
import { ActionLink, HorizontalSeparator } from 'twenty-ui';
import { SignInUpWithGoogle } from '@/auth/sign-in-up/components/SignInUpWithGoogle';
import { SignInUpWithMicrosoft } from '@/auth/sign-in-up/components/SignInUpWithMicrosoft';
import { SignInUpWithSSO } from '@/auth/sign-in-up/components/SignInUpWithSSO';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import styled from '@emotion/styled';
import { useRecoilValue } from 'recoil';
import { H2Title, MainButton } from 'twenty-ui';
import { H2Title, MainButton, HorizontalSeparator } from 'twenty-ui';
import { availableWorkspacesForAuthState } from '@/auth/states/availableWorkspacesForAuthState';
import { DEFAULT_WORKSPACE_LOGO } from '@/ui/navigation/navigation-drawer/constants/DefaultWorkspaceLogo';
import { redirectToWorkspace } from '~/utils/workspace-url.helper';
import { HorizontalSeparator } from '@/auth/sign-in-up/components/HorizontalSeparator';
import { isMultiWorkspaceEnabledState } from '@/client-config/states/isMultiWorkspaceEnabledState';

const StyledContentContainer = styled.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const useSignInUpForm = () => {
if (isDefined(email)) {
form.setValue('email', email);
} else if (isSignInPrefilled === true) {
form.setValue('email', 'moreaux.antoine@gmail.com');
form.setValue('email', 'tim@apple.dev');
form.setValue('password', 'Applecar2025');
}
}, [form, isSignInPrefilled]);
Expand Down

0 comments on commit f63f488

Please sign in to comment.