From e1a7a061900c089ee4c68615fc707257009385da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Mon, 15 Jul 2024 14:13:27 +0100 Subject: [PATCH] remove unnecessary useEffect & useState --- editor.planx.uk/src/pages/Pay/MakePayment.tsx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/editor.planx.uk/src/pages/Pay/MakePayment.tsx b/editor.planx.uk/src/pages/Pay/MakePayment.tsx index f6db81c4a1..da6d7c4d96 100644 --- a/editor.planx.uk/src/pages/Pay/MakePayment.tsx +++ b/editor.planx.uk/src/pages/Pay/MakePayment.tsx @@ -171,16 +171,7 @@ export default function MakePayment({ ); const PaymentDetails = () => { - const [projectType, setProjectType] = useState(); - - useEffect(() => { - const fetchProjectType = () => { - const projectType = formatRawProjectTypes(rawProjectTypes); - setProjectType(projectType); - }; - fetchProjectType(); - }, []); - + const projectType = formatRawProjectTypes(rawProjectTypes); const data = [ { term: "Application type", details: flowName }, {