Skip to content

Commit

Permalink
Bounce jam redirects to mytapes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dextorr committed Mar 6, 2019
1 parent 5eb214a commit 126daf3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/Jam.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import Tone from '../lib/tone'
import { withRouter } from 'react-router-dom'
import debounce from 'lodash/debounce'
import axios from 'axios'

Expand Down Expand Up @@ -190,10 +191,6 @@ class Jam extends React.Component {
Authorization: `Bearer ${token}`
}
})
.then(res => {
console.log('RES', res)
this.props.history.push('/mytapes')
})
.catch(err => console.error(err.message))
}

Expand Down Expand Up @@ -332,6 +329,7 @@ class Jam extends React.Component {
Tone.Transport.stop()
this.loop.stop()
this.props.updateUser()
this.props.history.push('/mytapes')
}
const loggedIn = this.state.loggedIn
return(
Expand Down Expand Up @@ -491,4 +489,4 @@ class Jam extends React.Component {
}
}

export default Jam
export default withRouter(Jam)

0 comments on commit 126daf3

Please sign in to comment.