diff --git a/frontend/src/containers/app.js b/frontend/src/containers/app.js index 1b317608..9b5c5605 100644 --- a/frontend/src/containers/app.js +++ b/frontend/src/containers/app.js @@ -2,9 +2,11 @@ const React = require('react'); const ReactRedux = require('react-redux'); const ReactRouter = require('react-router'); -const actions = require('../state/actions'); -const Home = require('./home/'); -const NotFound = require('./not-found/'); +const actions = require('@state/actions'); +const Home = require('@containers/home'); +const NotFound = require('@containers/not-found'); +const Header = require('@components/header'); + const { updateRouter diff --git a/frontend/src/root.js b/frontend/src/root.js index b92b2515..3f737ca3 100644 --- a/frontend/src/root.js +++ b/frontend/src/root.js @@ -4,8 +4,8 @@ const ReactHotLoader = require('react-hot-loader'); const ReactRedux = require('react-redux'); const ReactRouter = require('react-router'); -const App = require('./containers/app'); -const store = require('./state/store'); +const App = require('@containers/app'); +const store = require('@state/store'); const { IntlProvider diff --git a/frontend/src/state/actions.js b/frontend/src/state/actions.js index 01993adb..c421a45a 100644 --- a/frontend/src/state/actions.js +++ b/frontend/src/state/actions.js @@ -8,6 +8,6 @@ const { const APP = constantCase(process.env['APP_NAME']); module.exports = { - ...require('./thunks'), + ...require('@state/thunks'), updateRouter: createAction(`${APP}/APP/UPDATE_ROUTER`) }; diff --git a/frontend/src/state/reducers/app.js b/frontend/src/state/reducers/app.js index 3d301ee3..f762b2a9 100644 --- a/frontend/src/state/reducers/app.js +++ b/frontend/src/state/reducers/app.js @@ -1,5 +1,6 @@ const ReduxActions = require('redux-actions'); -const actions = require('../actions'); + +const actions = require('@state/actions'); const { handleActions diff --git a/frontend/src/state/reducers/index.js b/frontend/src/state/reducers/index.js index 5c9bd0ec..43fe5a11 100644 --- a/frontend/src/state/reducers/index.js +++ b/frontend/src/state/reducers/index.js @@ -6,7 +6,7 @@ const { module.exports = () => { return combineReducers({ - app: require('./app.js'), - intl: require('./intl.js') + app: require('@state/reducers/app'), + intl: require('@state/reducers/intl') }); }; diff --git a/frontend/src/state/reducers/intl.js b/frontend/src/state/reducers/intl.js index 479a5936..5fdaa26c 100644 --- a/frontend/src/state/reducers/intl.js +++ b/frontend/src/state/reducers/intl.js @@ -4,4 +4,6 @@ const { handleActions } = ReduxActions; -module.exports = handleActions({}, require('../../intl')); +module.exports = handleActions({ + 'x': (state) => state // somehow handleActions needs at least one reducer +}, require('@root/intl')); diff --git a/frontend/src/state/store.js b/frontend/src/state/store.js index 16dd22d8..70a3c77a 100644 --- a/frontend/src/state/store.js +++ b/frontend/src/state/store.js @@ -1,10 +1,11 @@ const createLogger = require('redux-logger'); -const createReducer = require('./reducers'); const enableBatching = require('redux-batched-actions').enableBatching; const promiseMiddleware = require('redux-promise-middleware').default; const redux = require('redux'); const thunk = require('redux-thunk').default; +const createReducer = require('@state/reducers'); + const { createStore, compose, diff --git a/frontend/src/state/thunks/index.js b/frontend/src/state/thunks/index.js index 7d61673d..8095da7a 100644 --- a/frontend/src/state/thunks/index.js +++ b/frontend/src/state/thunks/index.js @@ -1,3 +1,3 @@ module.exports = { - ...require('./app') + ...require('@state/thunks/app') }; diff --git a/ui/src/components/icon/index.js b/ui/src/components/icon/index.js index 7a317bfa..ec30f1d4 100644 --- a/ui/src/components/icon/index.js +++ b/ui/src/components/icon/index.js @@ -8,7 +8,6 @@ const Icon = ({ iconSet = 'fa', style }) => { - const Component = require(`react-icons/lib/${iconSet}/${name}`); const cn = classNames(