index.js

import { createOlafApplication } from 'olaf';
import App from './containers/App';
import betsReducer from './reducers/bets';
import commonReducer from './reducers/common';
import placebetReducer from './reducers/placebet';
import ticketsReducer from './reducers/tickets';
import authSaga from './sagas/auth';
import initSaga from './sagas/init';
import resultsSaga from './sagas/results';
import ticketsSaga from './sagas/tickets';
import placebetSaga from './sagas/placebet';
import roundSaga from './sagas/round';
import liveReducer from './reducers/live';
import liveSaga from './sagas/live';
import turboSaga from './sagas/turbo';
/**
 *
 * @external 'node_modules/olaf'
 * @see {@link https://gitlab.com/providus.mu/fe-utils/olaf}
 *
 */
/**
 * Olaf function to create usable aplications with passed routes, reducers, sagas and so on
 *
 * @function createOlafApplication
 * @returns {Application}
 */
createOlafApplication({
  name: 'stadium',
  immutable: true,
  hash: false,
  getRootDomElement: () => document.getElementById('project'),
  routes: [
    {
      path: '/',
      exact: false,
      component: App,
    },
  ],
  reducers: {
    bets: betsReducer,
    common: commonReducer,
    placebet: placebetReducer,
    tickets: ticketsReducer,
    live: liveReducer,
  },
  sagas: {
    auth: authSaga,
    init: initSaga,
    results: resultsSaga,
    tickets: ticketsSaga,
    placebet: placebetSaga,
    round: roundSaga,
    live: liveSaga,
    turbo: turboSaga,
  },
});