diff --git a/src/features/App/index.tsx b/src/features/App/index.tsx index 190e4ea6..2c0bdefd 100644 --- a/src/features/App/index.tsx +++ b/src/features/App/index.tsx @@ -25,8 +25,8 @@ setClientTitleAndDescription(client.title, client.description) const Main = () => { const { loadingUser, user } = useAuthStore() - if (!user && isMatchPage() && !isMatchPageRFEF() && !window.location.href.includes('1rfef')) return - if (!user && isMatchPageRFEF() && !isMatchPage() && window.location.href.includes('1rfef')) return + if (!user && isMatchPage()) return + if (!user && isMatchPageRFEF()) return // юзер считывается из localstorage или // access_token токен истек и запрашивается новый diff --git a/src/helpers/isMatchPage/index.tsx b/src/helpers/isMatchPage/index.tsx index 8fd23db0..ba8e3fa0 100644 --- a/src/helpers/isMatchPage/index.tsx +++ b/src/helpers/isMatchPage/index.tsx @@ -11,8 +11,7 @@ export const isMatchPage = () => { export const isMatchPageRFEF = () => { const splitPath = window.location.pathname.split('/') - const pageType = splitPath[3] - const matchId = toNumber(splitPath[3]) + const pageType = splitPath[1] - return pageType === 'matches' && !isUndefined(matchId) + return pageType === '1rfef' }