Проблема с Router + UseEffect

Ситуация такая у меня есть апи(method GET) который вызывается через Context, прописал state, reducer там всё ок. Вызываю данную функцию через useEffect и она вызывается. Проблема в том, что в networke при перезагрузке страницы функция с апи вызывается 5 раз одна и та же. прочекал по локам ошибка в Router. А именно в Подскажите как быть с данной ошибкой? парюсь уже несколько дней над этим

import { createBrowserHistory } from 'history';
const history = createBrowserHistory();
export default history;
    <BrowserRouter history={history}>
      <GuardProvider guards={[requireLogin]} loading={Loading} error={NotFoundPage}>
        {children(
          <Switch>
            <GuardedRoute
              path="/register"
              exact
              component={() => AuthContainer({children: RegisterPage()})}
              meta={{ auth: false }}
            />
            <GuardedRoute path="/login" exact component={() => AuthContainer({children: AuthPage()})} meta={{ auth: false }}
            />
            <GuardedRoute path="/pro" exact component={() => DefaultContainer({children: ProPage(), classes: 'page-pro'})} meta={{ auth: true }} />``

            <GuardedRoute path="/" exact component={() => DefaultContainer({children: TaskListPage()})} meta={{ auth: true }} />
            <GuardedRoute path="/task/:id" exact component={() => DefaultContainer({children: TaskInfoPage()})} meta={{ auth: true }} />
            <GuardedRoute path="/history" exact component={() => DefaultContainer({children:HistoryPage()})} meta={{ auth: true }} />
            <GuardedRoute path="*" component={() => DefaultContainer({children: NotFoundPage()})} />
          </Switch>
        )}
      </GuardProvider>
      <Tabbar/>
    </BrowserRouter>

Ответы (0 шт):