Skip to content

Commit

Permalink
remove unnecessary useEffect & useState
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Jul 15, 2024
1 parent 493175a commit e1a7a06
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions editor.planx.uk/src/pages/Pay/MakePayment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,7 @@ export default function MakePayment({
);

const PaymentDetails = () => {
const [projectType, setProjectType] = useState<string | undefined>();

useEffect(() => {
const fetchProjectType = () => {
const projectType = formatRawProjectTypes(rawProjectTypes);
setProjectType(projectType);
};
fetchProjectType();
}, []);

const projectType = formatRawProjectTypes(rawProjectTypes);
const data = [
{ term: "Application type", details: flowName },
{
Expand Down

0 comments on commit e1a7a06

Please sign in to comment.