diff --git a/replacements/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditMobile/EditMobile.tsx b/replacements/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditMobile/EditMobile.tsx deleted file mode 100644 index d5a1c0f..0000000 --- a/replacements/frontend/src/features/admin-form/create/builder-and-design/BuilderAndDesignDrawer/EditFieldDrawer/edit-fieldtype/EditMobile/EditMobile.tsx +++ /dev/null @@ -1,108 +0,0 @@ -import { useMemo } from 'react' -import { Box, FormControl } from '@chakra-ui/react' -import { extend, pick } from 'lodash' - -import { MobileFieldBase } from '~shared/types/field' - -import { createBaseValidationRules } from '~utils/fieldValidation' -import FormErrorMessage from '~components/FormControl/FormErrorMessage' -import FormLabel from '~components/FormControl/FormLabel' -import Input from '~components/Input' -import Textarea from '~components/Textarea' -import Toggle from '~components/Toggle' - -import { useFreeSmsQuota } from '~features/admin-form/common/queries' - -import { CreatePageDrawerContentContainer } from '../../../../../common' -import { FormFieldDrawerActions } from '../common/FormFieldDrawerActions' -import { EditFieldProps } from '../common/types' -import { useEditFieldForm } from '../common/useEditFieldForm' - -import { SmsCountMessage } from './SmsCountMessage' - -const EDIT_MOBILE_KEYS = [ - 'title', - 'description', - 'required', - 'isVerifiable', - 'allowIntlNumbers', -] as const - -type EditMobileProps = EditFieldProps - -type EditMobileInputs = Pick - -export const EditMobile = ({ field }: EditMobileProps): JSX.Element => { - const { - register, - formState: { errors }, - buttonText, - handleUpdateField, - isLoading, - handleCancel, - } = useEditFieldForm({ - field, - transform: { - input: (inputField) => pick(inputField, EDIT_MOBILE_KEYS), - output: (formOutput, originalField) => - extend({}, originalField, formOutput), - }, - }) - - const requiredValidationRule = useMemo( - () => createBaseValidationRules({ required: true }), - [], - ) - - const { data: freeSmsCount } = useFreeSmsQuota() - - return ( - <> - - - Question - - {errors?.title?.message} - - - Description -