Commit b6b6e7d9 authored by Stephanie Kirtiadi's avatar Stephanie Kirtiadi
Browse files

Select highest default perk on price change on Donation page

As per conversation with Richard and Peter to be applied
on the donate page.

Issue #48575
parent 7c4e3608
......@@ -80,13 +80,10 @@ export function _GivingForm(props) {
const onPriceChange = (price) => {
setSelectedPrice(price);
if (!noPerk) {
if (price < getPerkPrice(selectedPerk) || !selectedPerk) {
setSelectedPerk(getDefaultPerk(price));
}
}
if (getDefaultPerk(price) == null) {
if (getDefaultPerk(price) == null || noPerk) {
setNoPerk(true);
} else {
setSelectedPerk(getDefaultPerk(price));
}
}
......
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