diff --git a/src/index.html b/src/index.html index d619f501..0b7680bc 100755 --- a/src/index.html +++ b/src/index.html @@ -43,15 +43,6 @@ var build = "BUILD_HERE"; var version = "VERSION_HERE"; - // Initiate error tracking. This helps catch errors early so - // patches can accurately and quickly fix issues. - Raven.config( - 'https://023e3bf7721b48f29948545fc36a4621@sentry.io/219026', - { - release: version+"_"+build - } - ).install(); - // Construct the script tag var js = document.createElement("script"); js.type = "application/javascript"; @@ -60,11 +51,26 @@ var css = document.createElement("link"); css.rel = "stylesheet"; - // Identify whether we're in test mode, and need to fetch non-minified assets + // Check for test mode. This is toggled under Settings > Debug > Test mode var ui = JSON.parse( localStorage.getItem('ui') ); + + // Test mode either not enabled, or not configured if (typeof(ui) === 'undefined' || !ui || typeof(ui.test_mode) === 'undefined' || !ui.test_mode){ + + // Production-grade, minified app js.src = '/iris/app.min.js?v='+build; css.href = '/iris/app.min.css?v='+build; + + // Initiate error tracking. This helps catch errors early so + // patches can accurately and quickly fix issues. + Raven.config( + 'https://023e3bf7721b48f29948545fc36a4621@sentry.io/219026', + { + release: version+"_"+build + } + ).install(); + + // We're in test mode, so use built (but not minified) code } else { js.src = '/iris/app.js?v='+build; css.href = '/iris/app.css?v='+build; diff --git a/src/js/components/AddSeedField.js b/src/js/components/AddSeedField.js index cfb4a152..0bc70e94 100755 --- a/src/js/components/AddSeedField.js +++ b/src/js/components/AddSeedField.js @@ -6,6 +6,7 @@ import { Link, hashHistory } from 'react-router' import ArtistSentence from './ArtistSentence' import * as helpers from '../helpers' +import * as coreActions from '../services/core/actions' import * as uiActions from '../services/ui/actions' import * as spotifyActions from '../services/spotify/actions' @@ -67,11 +68,11 @@ class AddSeedField extends React.Component{ switch (helpers.uriType(item.uri)){ case 'artist': - this.props.uiActions.artistLoaded(item.uri,item) + this.props.coreActions.artistLoaded(item.uri,item) break case 'track': - this.props.uiActions.trackLoaded(item.uri,item) + this.props.coreActions.trackLoaded(item.uri,item) break } } @@ -143,6 +144,7 @@ const mapStateToProps = (state, ownProps) => { const mapDispatchToProps = (dispatch) => { return { + coreActions: bindActionCreators(coreActions, dispatch), uiActions: bindActionCreators(uiActions, dispatch), spotifyActions: bindActionCreators(spotifyActions, dispatch) } diff --git a/src/js/views/discover/DiscoverRecommendations.js b/src/js/views/discover/DiscoverRecommendations.js index 6c348953..e83097cb 100755 --- a/src/js/views/discover/DiscoverRecommendations.js +++ b/src/js/views/discover/DiscoverRecommendations.js @@ -157,7 +157,7 @@ class Discover extends React.Component{ {seed.name} ({type}) - this.removeSeed(seed.uri)} /> + this.removeSeed(index)} /> ) })