Commit 30217f52 authored by Stephanie Kirtiadi's avatar Stephanie Kirtiadi
Browse files

Only make the counter appears when the show counter checkbox is checked.

Issue #48277
parent 412b2d1e
......@@ -45,7 +45,7 @@ label = URL to redirect to after donation completed successfully
type = url
[fields.counter]
label = Display Counter
label = Display matching campaign counter?
type = boolean
[fields.single_one]
......
......@@ -21,13 +21,17 @@ const counters = [
];
export function CampaignTotals(props) {
const {donateProccessorBaseUrl} = props;
const {donateProccessorBaseUrl, showCounter} = props;
const [amounts, setAmounts] = useState({
'totalDonations': 0,
'totalAmount': 0,
'amountWithMozilla': 0
});
if (showCounter !== 'True') {
return null;
}
const requestTotal = async () => {
const options = {
headers: {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment