Skip to content

Commit

Permalink
EES-5040 remove formik
Browse files Browse the repository at this point in the history
  • Loading branch information
amyb-hiveit committed May 14, 2024
1 parent e642856 commit 659cc60
Show file tree
Hide file tree
Showing 169 changed files with 2,845 additions and 10,414 deletions.
59 changes: 3 additions & 56 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ module.exports = webpackEnv => {
'./dist/cpexcel.js': false,
'@admin': paths.appSrc,
'@common': 'explore-education-statistics-common/src',
formik: require.resolve('formik'),
react: require.resolve('react'),
},
fallback: {
Expand All @@ -334,7 +333,6 @@ module.exports = webpackEnv => {
babelRuntimeRegenerator,
// EES - Add extra allowed files for compatibility
// with our custom import aliases
require.resolve('formik'),
require.resolve('react'),
]),
],
Expand Down
1 change: 0 additions & 1 deletion src/explore-education-statistics-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"explore-education-statistics-ckeditor": "workspace:*",
"explore-education-statistics-common": "workspace:*",
"file-loader": "^6.2.0",
"formik": "^2.4.2",
"fs-extra": "^9.1.0",
"geojson": "^0.5.0",
"govuk-frontend": "^5.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { useCommentsContext } from '@admin/contexts/CommentsContext';
import Button from '@common/components/Button';
import ButtonGroup from '@common/components/ButtonGroup';
import ButtonText from '@common/components/ButtonText';
import RHFFormFieldTextArea from '@common/components/form/rhf/RHFFormFieldTextArea';
import FormProvider from '@common/components/form/rhf/FormProvider';
import RHFForm from '@common/components/form/rhf/RHFForm';
import FormFieldTextArea from '@common/components/form/FormFieldTextArea';
import FormProvider from '@common/components/form/FormProvider';
import Form from '@common/components/form/Form';
import usePinElementToContainer from '@common/hooks/usePinElementToContainer';
import Yup from '@common/validation/yup';
import React, { RefObject, useEffect, useRef } from 'react';
Expand Down Expand Up @@ -66,12 +66,12 @@ export default function CommentAddForm({
>
{({ formState }) => {
return (
<RHFForm
<Form
id={`${baseId}-commentAddForm`}
showErrorSummary={false}
onSubmit={handleSubmit}
>
<RHFFormFieldTextArea<FormValues>
<FormFieldTextArea<FormValues>
label="Comment"
hideLabel
name="content"
Expand All @@ -95,7 +95,7 @@ export default function CommentAddForm({
Cancel
</ButtonText>
</ButtonGroup>
</RHFForm>
</Form>
);
}}
</FormProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { Comment } from '@admin/services/types/content';
import Button from '@common/components/Button';
import ButtonGroup from '@common/components/ButtonGroup';
import ButtonText from '@common/components/ButtonText';
import FormProvider from '@common/components/form/rhf/FormProvider';
import RHFForm from '@common/components/form/rhf/RHFForm';
import RHFFormFieldTextArea from '@common/components/form/rhf/RHFFormFieldTextArea';
import FormProvider from '@common/components/form/FormProvider';
import Form from '@common/components/form/Form';
import FormFieldTextArea from '@common/components/form/FormFieldTextArea';
import useMounted from '@common/hooks/useMounted';
import Yup from '@common/validation/yup';
import React, { useRef } from 'react';
Expand Down Expand Up @@ -56,12 +56,12 @@ export default function CommentEditForm({
>
{({ formState }) => {
return (
<RHFForm
<Form
id={`${id}-editCommentForm`}
showErrorSummary={false}
onSubmit={handleSubmit}
>
<RHFFormFieldTextArea<FormValues>
<FormFieldTextArea<FormValues>
hideLabel
label="Comment"
name="content"
Expand All @@ -74,7 +74,7 @@ export default function CommentEditForm({
</Button>
<ButtonText onClick={onCancel}>Cancel</ButtonText>
</ButtonGroup>
</RHFForm>
</Form>
);
}}
</FormProvider>
Expand Down
Loading

0 comments on commit 659cc60

Please sign in to comment.