Skip to content

Commit

Permalink
Merge pull request #546 from Studio-Yandex-Practicum/fix-form-psevdonim
Browse files Browse the repository at this point in the history
fix: добавление фильтрации параметра nickname формы
  • Loading branch information
AntonZelinsky authored Sep 8, 2024
2 parents ab74c38 + b8c0dc5 commit d4de8dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/form/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ const Participation = () => {
}
try {
setRequestActive(true);
await postParticipation(form.values);
const participationData = form.values.anonym === false ? { ...form.values, nickname: '' } : form.values;
await postParticipation(participationData);
router.push('/form/success');
} catch (error) {
handleSubmitError(error);
Expand Down

0 comments on commit d4de8dc

Please sign in to comment.