Skip to content

Commit

Permalink
fix: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Birkbjo committed Feb 25, 2022
1 parent 172cc7d commit 9343cf2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/hooks/jobs/use-submit-job.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ const mutation = {
const useSubmitJob = () => {
const { refetchJobs } = useContext(StoreContext)
const engine = useDataEngine()
const submitJob = job => {
console.log('saving job', job)
return engine
const submitJob = job =>
engine
.mutate(mutation, { variables: { job } })
.then(() => {
history.push('/')
Expand All @@ -31,7 +30,7 @@ const useSubmitJob = () => {

// Throw any unexpected errors
throw error
})}
})

return [submitJob]
}
Expand Down

0 comments on commit 9343cf2

Please sign in to comment.