Skip to content

Commit

Permalink
Merge branch 'fix/title-prefixes' into release/hot-fixes-embed-redire…
Browse files Browse the repository at this point in the history
…ct-title-prefixes
  • Loading branch information
angelablake committed Nov 3, 2023
2 parents 92da34b + e6fc299 commit b20e3bb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ The 2% fee on Stripe donations only applies to donations taken via our free Stri
== Changelog ==
= 3.1.1: November 3rd, 2023 =
* Fix: Embedded forms created with the Visual Builder now redirect to the confirmation page after a completed donation.
* Fix: Donor title prefixes are now formatted as strings (like Mr or Ms) instead of numbers.

= 3.1.0: October 25th, 2023 =
* Feature: Design Mode changes in the Form Builder are now instant and awesome! Instant gratification!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ export default function Edit({
}: BlockEditProps<any>) {

const [selectedTitle, setSelectedTitle] = useState<string>(Object.values(honorifics)[0] as string ?? '');
const [honorificOptions, setHonorificOptions] = useState<OptionProps[]>(Object.keys(honorifics).map((token) => {
return {
label: titleLabelTransform(token),
value: titleValueTransform(token),
checked: selectedTitle === token,
} as OptionProps;
}));
const [honorificOptions, setHonorificOptions] = useState<OptionProps[]>(
Object.values(honorifics).map((token: string) => {
return {
label: titleLabelTransform(token),
value: titleValueTransform(token),
checked: selectedTitle === token,
} as OptionProps;
})
);

const setOptions = (options: OptionProps[]) => {
setHonorificOptions(options);
Expand Down

0 comments on commit b20e3bb

Please sign in to comment.