Skip to content

Commit

Permalink
fix: wait for register space before returning from space create onSub…
Browse files Browse the repository at this point in the history
…mit (#463)

because we weren't `await`ing here the space creation UI would flash
empty again, which was very confusing
  • Loading branch information
travis authored Mar 24, 2023
1 parent dc8ddca commit 9b35b2c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions examples/react/w3console/src/components/SpaceCreator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ export function SpaceCreatorForm ({
setSubmitted(true)
try {
await createSpace(name)
// ignore this because the Space UI should handle helping the user recover
// from space registration failure
void registerSpace(account, {provider: import.meta.env.VITE_W3UP_PROVIDER})
await registerSpace(account, {provider: import.meta.env.VITE_W3UP_PROVIDER})
} catch (error) {
/* eslint-disable no-console */
console.error(error)
Expand Down

0 comments on commit 9b35b2c

Please sign in to comment.