import { lazy } from 'react' import { Route, Redirect, Switch, } from 'react-router-dom' import { indexLexics } from 'config/lexics/indexLexics' import { PAGES } from 'config' import { StripeElements } from 'features/StripeElements' import { useLexicsConfig } from 'features/LexicsStore' import { ExtendedSearchStore } from 'features/ExtendedSearchPage' import { MatchSwitchesStore } from 'features/MatchSwitches' import { UserFavoritesStore } from 'features/UserFavorites/store' import { MatchPopup, MatchPopupStore } from 'features/MatchPopup' import { BuyMatchPopup, BuyMatchPopupStore } from 'features/BuyMatchPopup' import { PreferencesPopup, PreferencesPopupStore } from 'features/PreferencesPopup' import { CardsStore } from 'features/CardsStore' const HomePage = lazy(() => import('features/HomePage')) const UserAccount = lazy(() => import('features/UserAccount')) const TeamPage = lazy(() => import('features/TeamPage')) const MatchPage = lazy(() => import('features/MatchPage')) const PlayerPage = lazy(() => import('features/PlayerPage')) const TournamentPage = lazy(() => import('features/TournamentPage')) export const AuthenticatedApp = () => { useLexicsConfig(indexLexics) return ( {/* в Switch как прямой children можно рендерить только Route или Redirect */} ) }