From 6df5c6a8a61eae6d269162df5beeebb9a41c499c Mon Sep 17 00:00:00 2001 From: Christopher Chiche Date: Wed, 13 Sep 2023 13:45:26 +0200 Subject: [PATCH] Cleanup code according to Michael's suggestions --- reports/src/capability/ParticipantSelector.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/reports/src/capability/ParticipantSelector.tsx b/reports/src/capability/ParticipantSelector.tsx index a4a3a35..18ee0e8 100644 --- a/reports/src/capability/ParticipantSelector.tsx +++ b/reports/src/capability/ParticipantSelector.tsx @@ -17,13 +17,13 @@ export const ParticipantSelector = ({ }) => { const location = useLocation(); const navigate = useNavigate(); - const ussId = parseInt(location.pathname.split("/")[1]); + const participantId = parseInt(location.pathname.split("/")[1]); - const handleUsspSelect = (event: SelectChangeEvent) => { + const handleParticipantSelect = (event: SelectChangeEvent) => { const id = event.target.value; navigate(`/${id}`); }; - if (hideIfNoParticipant && Number.isNaN(ussId)) { + if (hideIfNoParticipant && Number.isNaN(participantId)) { return null; } return ( @@ -32,8 +32,8 @@ export const ParticipantSelector = ({