Refactor input arch (#1982)
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
import { useRecoilValue } from 'recoil';
|
||||
|
||||
import { currentUserState } from '@/auth/states/currentUserState';
|
||||
import { TextInputSettings } from '@/ui/input/text/components/TextInputSettings';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
|
||||
export const EmailField = () => {
|
||||
const currentUser = useRecoilValue(currentUserState);
|
||||
|
||||
return (
|
||||
<TextInputSettings
|
||||
<TextInput
|
||||
value={currentUser?.email}
|
||||
disabled
|
||||
fullWidth
|
||||
|
||||
@ -5,7 +5,7 @@ import debounce from 'lodash.debounce';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
|
||||
import { currentUserState } from '@/auth/states/currentUserState';
|
||||
import { TextInputSettings } from '@/ui/input/text/components/TextInputSettings';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { GET_CURRENT_USER } from '@/users/graphql/queries/getCurrentUser';
|
||||
import { useUpdateUserMutation } from '~/generated/graphql';
|
||||
import { logError } from '~/utils/logError';
|
||||
@ -87,14 +87,14 @@ export const NameFields = ({
|
||||
|
||||
return (
|
||||
<StyledComboInputContainer>
|
||||
<TextInputSettings
|
||||
<TextInput
|
||||
label="First Name"
|
||||
value={firstName}
|
||||
onChange={setFirstName}
|
||||
placeholder="Tim"
|
||||
fullWidth
|
||||
/>
|
||||
<TextInputSettings
|
||||
<TextInput
|
||||
label="Last Name"
|
||||
value={lastName}
|
||||
onChange={setLastName}
|
||||
|
||||
@ -3,7 +3,7 @@ import { getOperationName } from '@apollo/client/utilities';
|
||||
import { useRecoilState } from 'recoil';
|
||||
|
||||
import { currentUserState } from '@/auth/states/currentUserState';
|
||||
import { ImageInput } from '@/ui/input/image/components/ImageInput';
|
||||
import { ImageInput } from '@/ui/input/components/ImageInput';
|
||||
import { GET_CURRENT_USER } from '@/users/graphql/queries/getCurrentUser';
|
||||
import { getImageAbsoluteURIOrBase64 } from '@/users/utils/getProfilePictureAbsoluteURI';
|
||||
import {
|
||||
|
||||
@ -5,7 +5,7 @@ import debounce from 'lodash.debounce';
|
||||
import { useRecoilState } from 'recoil';
|
||||
|
||||
import { currentUserState } from '@/auth/states/currentUserState';
|
||||
import { TextInputSettings } from '@/ui/input/text/components/TextInputSettings';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { GET_CURRENT_USER } from '@/users/graphql/queries/getCurrentUser';
|
||||
import { useUpdateWorkspaceMutation } from '~/generated/graphql';
|
||||
import { logError } from '~/utils/logError';
|
||||
@ -72,7 +72,7 @@ export const NameField = ({
|
||||
|
||||
return (
|
||||
<StyledComboInputContainer>
|
||||
<TextInputSettings
|
||||
<TextInput
|
||||
label="Name"
|
||||
value={displayName}
|
||||
onChange={setDisplayName}
|
||||
|
||||
@ -2,7 +2,7 @@ import { getOperationName } from '@apollo/client/utilities';
|
||||
import { useRecoilState } from 'recoil';
|
||||
|
||||
import { currentUserState } from '@/auth/states/currentUserState';
|
||||
import { ImageInput } from '@/ui/input/image/components/ImageInput';
|
||||
import { ImageInput } from '@/ui/input/components/ImageInput';
|
||||
import { GET_CURRENT_USER } from '@/users/graphql/queries/getCurrentUser';
|
||||
import { getImageAbsoluteURIOrBase64 } from '@/users/utils/getProfilePictureAbsoluteURI';
|
||||
import {
|
||||
|
||||
Reference in New Issue
Block a user