update user_id 4

This commit is contained in:
Mohamed Nouffer
2023-07-26 18:05:18 +05:30
parent dfa552ab46
commit ee98865f00
9 changed files with 37 additions and 35 deletions

View File

@ -157,28 +157,30 @@ const TheContent = () => {
return (
<main className="c-main">
{isDataFetched ? ( // Render the component only when isDataFetched is true
<CContainer fluid>
<Suspense fallback={loading}>
<Switch>
{routes.map((route, idx) => {
return route.component && (
<Route
key={idx}
path={route.path}
exact={route.exact}
name={route.name}
render={(props) =>
<CContainer fluid>
<Suspense fallback={loading}>
<Switch>
{routes.map((route, idx) => {
return route.component && (
<Route
key={idx}
path={route.path}
exact={route.exact}
name={route.name}
render={(props) =>
get_token_from_storage_or_cookie() !== null ? (
<route.component {...props} userid={UserId} email={UserData.email} />
}
/>
);
})}
<Redirect from="/" to="/dashboard" />
</Switch>
</Suspense>
</CContainer>
) : null}
) : (
<Redirect to={{ pathname: "/sso" }} />
)
}
/>
);
})}
<Redirect from="/" to="/dashboard" />
</Switch>
</Suspense>
</CContainer>
</main>
);
}