React Maximum update depth exceeded error

I want to redirect to login if user manually clear localstorage or cookie token. If I put condition based on Cookie 'undefined', I'm getting Error: Maximum update depth exceeded.React limits the number of nested updates to prevent infinite loops.

//components
import routes from "./route_config";
import { accessTokenHelper } from "../helper/token"

const authed = () => localStorage.hasOwnProperty("TOKEN");
const authToken = accessTokenHelper.get();

const authPath = "/login";

const Routes = () => (
  <Router>
    <Suspense fallback={"Loading...."}>
      <Switch>
        {routes.map((route, i) => (
          <Route
            key={route.key || i}
            path={route.path}
            exact={route.exact}
            render={(props) => {
              if (route.authentication && route.path !== authPath) {
                if (authToken) {
                  return <route.component {...props} routes={route.routes} />;
                }
                if (!authToken) return <Redirect to="/login" />;
              }
              if (!route.authentication) {
                if (route.path === authPath) {
                  if (authed()) return <Redirect to="/" />;
                  if (!authed()) return <route.component {...props} />;
                } else if (route.default) {
                  if (authed()) return <Redirect to="/" />;
                  if (!authed()) return <Redirect to="/login" />;
                } else {
                  return <route.component {...props} />;
                }
              }
            }}
          />
        ))}
      </Switch>
    </Suspense>
  </Router>
);

export default Routes;