Move create project into plus button (fix back button issue) #531

Merged
Irev-Dev merged 1 commits from kurt/511 into main 2021-09-27 12:43:31 +02:00
Irev-Dev commented 2021-09-25 10:04:32 +02:00 (Migrated from github.com)

The draft page used to automatically create a new project and route
the user to the new project if the user was signed in. Problem arose
if the user use the back button as they would end up creating more
project. resolved my moving this logic into the plus button itself

Resolves #511

The draft page used to automatically create a new project and route the user to the new project if the user was signed in. Problem arose if the user use the back button as they would end up creating more project. resolved my moving this logic into the plus button itself Resolves #511
Irev-Dev (Migrated from github.com) reviewed 2021-09-25 10:07:30 +02:00
@@ -37,0 +59,4 @@
routes.ide({
userName: project?.user?.userName,
projectTitle: project?.title,
})
Irev-Dev (Migrated from github.com) commented 2021-09-25 10:07:29 +02:00

Pretty much just dumped the logic from the draft page into this button instead.

@franknoirot work noting that I used the pattern we talked about earlier today with toast.promise and the promise returned by the useMutation function is not weird and graphQLly like i thought it might have been. i.e. I verified that it throws if there is a graphQL error.

Pretty much just dumped the logic from the draft page into this button instead. @franknoirot work noting that I used the pattern we talked about earlier today with toast.promise and the promise returned by the useMutation function is not weird and graphQLly like i thought it might have been. i.e. I verified that it throws if there is a graphQL error.
franknoirot (Migrated from github.com) approved these changes 2021-09-27 02:41:28 +02:00
franknoirot (Migrated from github.com) left a comment

Finally got around to testing this out for real with logged-in and not-logged-in users, working well.

Finally got around to testing this out for real with logged-in and not-logged-in users, working well.
@@ -37,0 +59,4 @@
routes.ide({
userName: project?.user?.userName,
projectTitle: project?.title,
})
franknoirot (Migrated from github.com) commented 2021-09-27 02:40:46 +02:00

Very helpful, thanks @Irev-Dev .

Very helpful, thanks @Irev-Dev .
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: h3n3/cadhub#531