Skip to content

Commit b5dd633

Browse files
aapelivclaude
andcommitted
Remove donation_amounts feature flag from DonationsBox
The only frontend experiment - drop the useFeatureValue hook and use the DONATIONS_BOX_VALUES constant directly at all three reference sites. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 719ce3a commit b5dd633

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

app/web/features/donations/DonationsBox.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { useMutation } from "@tanstack/react-query";
1313
import Alert from "components/Alert";
1414
import Button from "components/Button";
1515
import StyledLink from "components/StyledLink";
16-
import { useFeatureValue } from "experimentation";
1716
import {
1817
DONATIONS_BOX_CURRENCY,
1918
DONATIONS_BOX_VALUES,
@@ -218,11 +217,6 @@ interface DonationFormData {
218217
export default function DonationsBox() {
219218
const { t } = useTranslation(DONATIONS);
220219

221-
const donationAmounts = useFeatureValue<number[]>(
222-
"donation_amounts",
223-
DONATIONS_BOX_VALUES,
224-
);
225-
226220
const [isPredefinedAmount, setIsPredefinedAmount] = useState(true);
227221

228222
const router = useRouter();
@@ -355,11 +349,11 @@ export default function DonationsBox() {
355349
<Controller
356350
name="amount"
357351
control={control}
358-
defaultValue={donationAmounts[2]}
352+
defaultValue={DONATIONS_BOX_VALUES[2]}
359353
render={({ field }) => (
360354
<AmountGrid>
361355
{[
362-
...donationAmounts.map((value) => {
356+
...DONATIONS_BOX_VALUES.map((value) => {
363357
return (
364358
<StyledAmountButton
365359
key={value}
@@ -386,7 +380,7 @@ export default function DonationsBox() {
386380
field.onChange(
387381
typeof e.target.valueAsNumber === "number"
388382
? e.target.valueAsNumber
389-
: donationAmounts[0],
383+
: DONATIONS_BOX_VALUES[0],
390384
);
391385
setIsPredefinedAmount(false);
392386
}}

0 commit comments

Comments
 (0)