about summary refs log tree commit diff
path: root/src/screens/Signup/state.ts
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2024-03-21 14:11:23 -0500
committerGitHub <noreply@github.com>2024-03-21 12:11:23 -0700
commit4d50aac4eee478c09ccc22e7c40b1b93b8ac93ec (patch)
tree884e3f3d5a71ef9afd7c3b83051b809ead4969e9 /src/screens/Signup/state.ts
parente874dd290ed07b372c5f7ca1fd763f32947c4352 (diff)
downloadvoidsky-4d50aac4eee478c09ccc22e7c40b1b93b8ac93ec.tar.zst
Release fixes (#3318)
* Fix error overflow

* await setSavedFeeds before setting birth date

* await birth date first instead of feeds

---------

Co-authored-by: Samuel Newman <mozzius@protonmail.com>
Diffstat (limited to 'src/screens/Signup/state.ts')
-rw-r--r--src/screens/Signup/state.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/screens/Signup/state.ts b/src/screens/Signup/state.ts
index f185e2d44..86a144368 100644
--- a/src/screens/Signup/state.ts
+++ b/src/screens/Signup/state.ts
@@ -207,7 +207,7 @@ export function useSubmitSignup({
 }) {
   const {_} = useLingui()
   const {createAccount} = useSessionApi()
-  const {mutate: setBirthDate} = usePreferencesSetBirthDateMutation()
+  const {mutateAsync: setBirthDate} = usePreferencesSetBirthDateMutation()
   const {mutate: setSavedFeeds} = useSetSaveFeedsMutation()
   const onboardingDispatch = useOnboardingDispatch()
 
@@ -264,7 +264,7 @@ export function useSubmitSignup({
           inviteCode: state.inviteCode.trim(),
           verificationCode: verificationCode,
         })
-        setBirthDate({birthDate: state.dateOfBirth})
+        await setBirthDate({birthDate: state.dateOfBirth})
         if (IS_PROD_SERVICE(state.serviceUrl)) {
           setSavedFeeds(DEFAULT_PROD_FEEDS)
         }