Skip to content

Commit

Permalink
fix(payment): select year offer by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristiaanScheermeijer committed Aug 4, 2021
1 parent af5be5e commit d85c9ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/containers/AccountModal/forms/ChooseOffer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const ChooseOffer = () => {
const validationSchema: SchemaOf<ChooseOfferFormData> = object().shape({
periodicity: mixed<OfferPeriodicity>().required(t('choose_offer.field_required')),
});
const initialValues: ChooseOfferFormData = { periodicity: offer?.period === 'year' ? 'yearly' : 'monthly' };
const initialValues: ChooseOfferFormData = { periodicity: offer?.period === 'month' ? 'monthly' : 'yearly' };
const { handleSubmit, handleChange, values, errors, submitting } = useForm(initialValues, chooseOfferSubmitHandler, validationSchema);

// loading state
Expand Down

0 comments on commit d85c9ba

Please sign in to comment.