diff --git a/src/App/App.js b/src/App/App.js index 059e7768f..936fb9137 100644 --- a/src/App/App.js +++ b/src/App/App.js @@ -1,17 +1,23 @@ const React = require('react'); const { Router } = require('stremio-navigation'); -const { homePath, onPathNotMatch, views: viewsConfig } = require('./routerConfig'); +const routerConfig = require('./routerConfig'); const styles = require('./styles'); -const App = () => ( - - - -); +const App = () => { + const onPathNotMatch = React.useCallback(() => { + window.history.back(); + }, []); + + return ( + + + + ); +}; module.exports = App; diff --git a/src/App/routerConfig.js b/src/App/routerConfig.js index d30febb61..9e9dd3980 100644 --- a/src/App/routerConfig.js +++ b/src/App/routerConfig.js @@ -45,12 +45,8 @@ const views = [ } ] ]; -const onPathNotMatch = () => { - window.history.back(); -}; module.exports = { homePath, - views, - onPathNotMatch + views };