Move create project into plus button (fix back button issue) #531
Reference in New Issue
Block a user
Delete Branch "kurt/511"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
@@ -37,0 +59,4 @@routes.ide({userName: project?.user?.userName,projectTitle: project?.title,})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.
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,})Very helpful, thanks @Irev-Dev .