From cef95d74753726101d3bb1ea7b5d0e5fc06910b3 Mon Sep 17 00:00:00 2001 From: danetsaoo Date: Thu, 15 Feb 2024 20:55:26 -0600 Subject: [PATCH] Fix issues --- src/components/Criteria/CriteriaCard.tsx | 30 +++++++++++++----------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/components/Criteria/CriteriaCard.tsx b/src/components/Criteria/CriteriaCard.tsx index 5fd60ef..0397258 100644 --- a/src/components/Criteria/CriteriaCard.tsx +++ b/src/components/Criteria/CriteriaCard.tsx @@ -33,6 +33,20 @@ export default function CriteriaCard({ format: (value) => value ?? CriteriaTerminalType.PASS, }).input.value; + const noneOfReturnType = ( + + {({ fields }) => fields.map((innerName, index) => ( + fields.remove(index)} + /> + )) + } + + ); + const cardInterior = useMemo(() => { switch (type) { case CriteriaTerminalType.PASS: @@ -41,19 +55,7 @@ export default function CriteriaCard({ case CriteriaGroupType.ALL_OF: case CriteriaGroupType.ANY_OF: case CriteriaGroupType.NONE_OF: - return ( - - {({ fields }) => fields.map((innerName, index) => ( - fields.remove(index)} - /> - )) - } - - ); + return (noneOfReturnType); case CriteriaTerminalType.AGE: return ( @@ -101,7 +103,7 @@ export default function CriteriaCard({ default: return ; } - }, [name, type]); + }, [type]); return (