Skip to content

Commit

Permalink
handle single parties signature widget
Browse files Browse the repository at this point in the history
  • Loading branch information
tttp committed May 20, 2024
1 parent ad20ddf commit 0346329
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/bespoke/ep2024/signatories.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const ListSignatories = () => {
// data.map((d) => countries.add(d.area));
//var obj = Array.from(countries).reduce(function(o, val) { o[val] = false; return o; }, {});
//console.log(obj);
const country = form.watch("supporter_country");
const country = config.component.country || form.watch("supporter_country");
let filtered = data.filter((d) => d.country === country);

const empty = filtered.length === 0;
Expand Down Expand Up @@ -127,7 +127,9 @@ const ListSignatories = () => {
});
return (
<div id="proca-signature">
<Country form={form} name="supporter_country" />
{!config.component.country && (
<Country form={form} name="supporter_country" />
)}
<Party
selecting={filterSignature}
country={country}
Expand Down

0 comments on commit 0346329

Please sign in to comment.