Skip to content

Commit

Permalink
chore(experience): move shared form components into components file (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyijun authored Aug 16, 2024
1 parent 36f1055 commit e9eb212
Show file tree
Hide file tree
Showing 20 changed files with 8 additions and 12 deletions.
3 changes: 1 addition & 2 deletions packages/experience/src/pages/IdentifierRegister/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ import { useTranslation } from 'react-i18next';
import { Navigate } from 'react-router-dom';

import FocusedAuthPageLayout from '@/Layout/FocusedAuthPageLayout';
import IdentifierRegisterForm from '@/components/IdentifierRegisterForm';
import { identifierInputDescriptionMap } from '@/utils/form';

import IdentifierRegisterForm from '../Register/IdentifierRegisterForm';

import useIdentifierSignUpMethods from './use-identifier-sign-up-methods';

const IdentifierRegister = () => {
Expand Down
5 changes: 2 additions & 3 deletions packages/experience/src/pages/IdentifierSignIn/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import { useTranslation } from 'react-i18next';
import { Navigate } from 'react-router-dom';

import FocusedAuthPageLayout from '@/Layout/FocusedAuthPageLayout';
import IdentifierSignInForm from '@/components/IdentifierSignInForm';
import PasswordSignInForm from '@/components/PasswordSignInForm';
import { identifierInputDescriptionMap } from '@/utils/form';

import IdentifierSignInForm from '../SignIn/IdentifierSignInForm';
import PasswordSignInForm from '../SignIn/PasswordSignInForm';

import useIdentifierSignInMethods from './use-identifier-sign-in-methods';

const IdentifierSignIn = () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/experience/src/pages/Register/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import SingleSignOnFormModeContextProvider from '@/Providers/SingleSignOnFormMod
import SingleSignOnFormModeContext from '@/Providers/SingleSignOnFormModeContextProvider/SingleSignOnFormModeContext';
import Divider from '@/components/Divider';
import GoogleOneTap from '@/components/GoogleOneTap';
import IdentifierRegisterForm from '@/components/IdentifierRegisterForm';
import TextLink from '@/components/TextLink';
import SocialSignInList from '@/containers/SocialSignInList';
import TermsAndPrivacyCheckbox from '@/containers/TermsAndPrivacyCheckbox';
Expand All @@ -17,7 +18,6 @@ import useTerms from '@/hooks/use-terms';

import ErrorPage from '../ErrorPage';

import IdentifierRegisterForm from './IdentifierRegisterForm';
import styles from './index.module.scss';

const RegisterFooter = () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/experience/src/pages/SignIn/Main.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { type SignIn, type ExperienceSocialConnector, AgreeToTermsPolicy } from '@logto/schemas';

import IdentifierSignInForm from '@/components/IdentifierSignInForm';
import PasswordSignInForm from '@/components/PasswordSignInForm';
import SocialSignInList from '@/containers/SocialSignInList';
import TermsAndPrivacyCheckbox from '@/containers/TermsAndPrivacyCheckbox';
import useTerms from '@/hooks/use-terms';

import IdentifierSignInForm from './IdentifierSignInForm';
import PasswordSignInForm from './PasswordSignInForm';
import styles from './index.module.scss';

type Props = {
Expand Down
3 changes: 1 addition & 2 deletions packages/experience/src/pages/SingleSignOnEmail/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import SecondaryPageLayout from '@/Layout/SecondaryPageLayout';

import SingleSignOnForm from './SingleSignOnForm';
import SingleSignOnForm from '@/components/SingleSignOnForm';

const SingleSignOnEmail = () => {
return (
Expand Down
3 changes: 1 addition & 2 deletions packages/experience/src/pages/SingleSignOnLanding/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { AgreeToTermsPolicy, experience } from '@logto/schemas';
import { useTranslation } from 'react-i18next';

import FocusedAuthPageLayout from '@/Layout/FocusedAuthPageLayout';
import SingleSignOnForm from '@/components/SingleSignOnForm';
import useTerms from '@/hooks/use-terms';

import SingleSignOnForm from '../SingleSignOnEmail/SingleSignOnForm';

const SingleSignOnLanding = () => {
const { t } = useTranslation();
const { agreeToTermsPolicy } = useTerms();
Expand Down

0 comments on commit e9eb212

Please sign in to comment.