ItemRouter.js

import React from 'react';
import { Routes, Route } from 'react-router-dom';
import { PAGES } from './constants';
import UserSettings from './containers/Admin/UserSettings';
import RolesSettings from './containers/Admin/RoleSettings';
import Coupons from './containers/Coupons';
import RoundsDetails from './containers/Rounds/RoundsDetails';
import RoundTurbo from './containers/Rounds/RoundTurbo';
import RoundReports from './containers/Reports/RoundReports';
import TurnoverReports from './containers/Reports/TurnoverReports';
import ClientRanks from './containers/Bonus/ClientRanks';
import ClientBonuses from './containers/Bonus/ClientBonuses';
import BonusSettings from './containers/Bonus/BonusSettings';
import RankSettings from './containers/Bonus/RankSettings';
import PointSettings from './containers/Bonus/PointSettings';
import MarketsSettings from './containers/Settings/MarketsSettings';
import MarketsSettingsShop from './containers/Settings/MarketSettingsShop';
import LeaguesSettings from './containers/Settings/LeaguesSettings';
import FreeBets from './containers/Bonus/FreeBets';
import Profile from './containers/Profile';
import GamesSettings from './containers/Settings/GamesSettings';
import GamesSettingsShop from './containers/Settings/GameSettingsShop';
import RoundDurationSettings from './containers/Settings/MatchRoundDurationSettings';
import OddsTemplatesFile from './containers/Settings/OddsTemplatesFile';
import OddsTemplate from './containers/Settings/OddsTemplate';
import RoundReportsShop from './containers/Reports/RoundReportsShop';
import RoundsShop from './containers/Rounds/RoundsShop';
import CashierList from './containers/Cashiers/CashierList';
import OddsTemplateShop from './containers/Settings/OddsTemplateShop';
import StatsTemplateMobile from './containers/Settings/StatsTemplateMobile/StatsTemplateMobile';
import StatementList from './containers/Cashiers/StatementList';
import JackpotSettings from './containers/Jackpot/JackpotSettings/JackpotSettings';
import JackpotWon from './containers/Jackpot/JackpotWon';
import InvalidateOdds from './containers/Settings/InvalidateOdds/InvalidateOdds';
import FreeBetsCampaigns from './containers/Bonus/FreeBetsCampaigns';
import StatsTemplatesFile from './containers/Settings/StatsTemplateFile/StatsTemplatesFile';
import MarketMargins from './containers/Settings/MarketMargins/MarketMargins';
import VideoAction from './containers/Settings/VideoAction/VideoAction';
import { getChildPathname } from './utils/common';
import FreeBetShopReports from './containers/Reports/FreeBetShopReports';
/**
 * Handle rendering content depend on current page string
 *
 * @module ItemRouter
 */
/**
 * @returns {view} Content of selected page
 */
const ItemRouter = () => (
  <Routes>
    <Route path={getChildPathname(PAGES.COUPONS_SETTLED_VIEW)} element={<Coupons />} />
    <Route path={getChildPathname(PAGES.COUPONS_PLACED_VIEW)} element={<Coupons />} />
    <Route path={getChildPathname(PAGES.SHOP_COUPONS_PLACED_VIEW)} element={<Coupons />} />
    <Route path={getChildPathname(PAGES.SHOP_COUPONS_SETTLED_VIEW)} element={<Coupons />} />
    <Route path={getChildPathname(PAGES.ROUNDS_VIEW)} element={<RoundsDetails />} />
    <Route path={getChildPathname(PAGES.ROUNDS_TURBO_VIEW)} element={<RoundTurbo />} />
    <Route path={getChildPathname(PAGES.SHOP_ROUNDS_VIEW)} element={<RoundsShop />} />
    <Route path={getChildPathname(PAGES.ROUND_REPORT_VIEW)} element={<RoundReports />} />
    <Route path={getChildPathname(PAGES.SHOP_ROUND_REPORT_VIEW)} element={<RoundReportsShop />} />
    <Route path={getChildPathname(PAGES.TURNOVER_REPORT_VIEW)} element={<TurnoverReports />} />
    <Route path={getChildPathname(PAGES.FREE_BETS_VIEW)} element={<FreeBets />} />
    <Route path={getChildPathname(PAGES.FREE_BETS_CAMPAIGNS_VIEW)} element={<FreeBetsCampaigns />} />
    <Route path={getChildPathname(PAGES.CLIENT_RANKS_VIEW)} element={<ClientRanks />} />
    <Route path={getChildPathname(PAGES.CLIENT_BONUSES_VIEW)} element={<ClientBonuses />} />
    <Route path={getChildPathname(PAGES.BONUS_SETTINGS_VIEW)} element={<BonusSettings />} />
    <Route path={getChildPathname(PAGES.RANK_SETTINGS_VIEW)} element={<RankSettings />} />
    <Route path={getChildPathname(PAGES.POINT_SETTINGS_VIEW)} element={<PointSettings />} />
    <Route path={getChildPathname(PAGES.SETTINGS_LEAGUES_VIEW)} element={<LeaguesSettings />} />
    <Route path={getChildPathname(PAGES.SETTINGS_MARKET_VIEW)} element={<MarketsSettings />} />
    <Route path={getChildPathname(PAGES.SHOP_SETTINGS_MARKET_VIEW)} element={<MarketsSettingsShop />} />
    <Route path={getChildPathname(PAGES.ADMIN_USERS_VIEW)} element={<UserSettings />} />
    <Route path={getChildPathname(PAGES.ADMIN_ROLES_VIEW)} element={<RolesSettings />} />
    <Route path={getChildPathname(PAGES.MY_PROFILE)} element={<Profile />} />
    <Route path={getChildPathname(PAGES.GAMES_SETTINGS_VIEW)} element={<GamesSettings />} />
    <Route path={getChildPathname(PAGES.SHOP_GAMES_SETTINGS_VIEW)} element={<GamesSettingsShop />} />
    <Route path={getChildPathname(PAGES.ROUND_DURATION_SETTINGS_VIEW)} element={<RoundDurationSettings />} />
    <Route path={getChildPathname(PAGES.ODDS_TEMPLATE_FILES_VIEW)} element={<OddsTemplatesFile />} />
    <Route path={getChildPathname(PAGES.SHOP_ODDS_TEMPLATE_VIEW)} element={<OddsTemplateShop />} />
    <Route path={getChildPathname(PAGES.ODDS_TEMPLATE_FILES_UPLOAD)} element={<OddsTemplate />} />
    <Route path={getChildPathname(PAGES.STATS_TEMPLATE_VIEW)} element={<StatsTemplateMobile />} />
    <Route path={getChildPathname(PAGES.STATS_TEMPLATE_FILES_VIEW)} element={<StatsTemplatesFile />} />
    <Route path={getChildPathname(PAGES.SETTINGS_MARKET_MARGIN_VIEW)} element={<MarketMargins />} />
    <Route path={getChildPathname(PAGES.STATEMENTS_VIEW)} element={<StatementList />} />
    <Route path={getChildPathname(PAGES.CASHIERS_VIEW)} element={<CashierList />} />
    <Route path={getChildPathname(PAGES.JACKPOT_SETTINGS_VIEW)} element={<JackpotSettings />} />
    <Route path={getChildPathname(PAGES.JACKPOT_WON_VIEW)} element={<JackpotWon />} />
    <Route path={getChildPathname(PAGES.INVALIDATE_ODDS_VIEW)} element={<InvalidateOdds />} />
    <Route path={getChildPathname(PAGES.SETTINGS_VIDEO_ACTION_VIEW)} element={<VideoAction />} />
    <Route path={getChildPathname(PAGES.FREE_BETS_SHOP_REPORT_VIEW)} element={<FreeBetShopReports />} />
    <Route path={getChildPathname(PAGES.MAIN)} element={<div className="main-wrapper" />} />
  </Routes>
);

export default ItemRouter;