From a835ae14d502e1c8f730d2835742936ed1fce1c6 Mon Sep 17 00:00:00 2001 From: Birk Johansson Date: Tue, 30 Jan 2024 02:17:59 +0100 Subject: [PATCH] refactor: more cleanup --- .../sectionList/listView/ManageListView.tsx | 90 +++++++++---------- 1 file changed, 43 insertions(+), 47 deletions(-) diff --git a/src/components/sectionList/listView/ManageListView.tsx b/src/components/sectionList/listView/ManageListView.tsx index ca13fd36..b0e97a3c 100644 --- a/src/components/sectionList/listView/ManageListView.tsx +++ b/src/components/sectionList/listView/ManageListView.tsx @@ -29,6 +29,7 @@ type FormValues = { columns: string[] filters: string[] } + const validate = (values: FormValues) => { const errors: Record = {} @@ -91,53 +92,48 @@ export const ManageListView = ({ }, [savedFilters, savedColumns, filtersConfig, columnsConfig]) return ( - <> -
- {({ handleSubmit, submitting, submitError }) => ( - - ({ label: c.label, value: c.path }) - )} - /> - ({ label: f.label, value: f.filterKey }) - )} - /> - {submitError && ( -

- - {submitError} - -

- )} - {children({ - submitting, - })} - - )} - - +
+ {({ handleSubmit, submitting, submitError }) => ( + + ({ + label: c.label, + value: c.path, + }))} + /> + ({ + label: f.label, + value: f.filterKey, + }))} + /> + {submitError && ( +

+ + {submitError} + +

+ )} + {children({ + submitting, + })} + + )} + ) }