Issue-178 Add draft mode for IDE
resolves #178 Initially the UI forced users to create a "part" before they got access to the ide, now we're letting users go straight to hacking in the ide and saving can come later. Better at getting users to the code earlier
This commit is contained in:
@@ -117,7 +117,7 @@ export const Success = ({ userPart, variables: { isEditable }, refetch }) => {
|
||||
addMessage('Part updated.', { classes: 'rw-flash-success' })
|
||||
},
|
||||
})
|
||||
const [createUser] = useMutation(CREATE_PART_MUTATION, {
|
||||
const [createPart] = useMutation(CREATE_PART_MUTATION, {
|
||||
onCompleted: ({ createPart }) => {
|
||||
navigate(
|
||||
routes.part({
|
||||
@@ -130,7 +130,7 @@ export const Success = ({ userPart, variables: { isEditable }, refetch }) => {
|
||||
})
|
||||
const onSave = (id, input) => {
|
||||
if (!id) {
|
||||
createUser({ variables: { input } })
|
||||
createPart({ variables: { input } })
|
||||
return
|
||||
}
|
||||
updateUser({ variables: { id, input } })
|
||||
|
||||
Reference in New Issue
Block a user