Skip to content

Commit

Permalink
Display leeds signatories fix
Browse files Browse the repository at this point in the history
  • Loading branch information
1v4n4 committed Dec 31, 2024
1 parent 8bf36de commit 570f295
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/components/bespoke/Signatories.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const Signatories = () => {
const partiesData = await res.json();
setParties(partiesData);
};
getParties(config.component.party.url);
getParties(config.component.party?.url);
}, []);

return (
Expand All @@ -71,15 +71,16 @@ const Signatories = () => {
{signatories.length} {t("signed", "have signed the pledge")}
</Typography>
<Grid item>
<TextField
{parties.length > 0 &&
<TextField
select={true}
name="party"
label={t("party")}
onChange={e => {
e.target.value
? setSelection(
signatories.filter(p => p.party == e.target.value)
)
signatories.filter(p => p.party == e.target.value)
)
: setSelection(signatories);
}}
SelectProps={{
Expand All @@ -94,7 +95,8 @@ const Signatories = () => {
</option>
);
})}
</TextField>
</TextField>
}

<List
dense={true}
Expand Down

0 comments on commit 570f295

Please sign in to comment.