Skip to content

Commit

Permalink
fix: turn off autofill (#1017)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyjablonski authored Dec 18, 2024
1 parent 62dd0b1 commit 60d30ae
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions sites/public/src/pages/applications/start/autofill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,23 @@ export default () => {

useEffect(() => {
if (!previousApplication && initialStateLoaded) {
if (profile) {
void applicationsService
.mostRecentlyCreated({
userId: profile.id,
})
.then((res) => {
if (res && res.applicant) {
setPreviousApplication(new AutofillCleaner(res).clean())
} else {
onSubmit()
}
})
} else {
onSubmit()
}
// Temporarily turning autofill off
// if (profile) {
// void applicationsService
// .mostRecentlyCreated({
// userId: profile.id,
// })
// .then((res) => {
// if (res && res.applicant) {
// setPreviousApplication(new AutofillCleaner(res).clean())
// } else {
// onSubmit()
// }
// })
// } else {
// onSubmit()
// }
onSubmit()
}
}, [profile, applicationsService, onSubmit, previousApplication, initialStateLoaded])

Expand Down

0 comments on commit 60d30ae

Please sign in to comment.