update user_id 16

This commit is contained in:
Mohamed Nouffer
2023-07-26 22:41:29 +05:30
parent e859ab2d3d
commit cd014e8561
41 changed files with 93 additions and 81 deletions

View File

@ -27,6 +27,7 @@ const TheContent = () => {
const [UserId, setUserId] = useState('');
const [isDataFetched, setIsDataFetched] = useState(false);
const [isPosted, setPosted] = useState(false);
const [GotUserId, setGotUserId] = useState(false);
async function fetchSession() {
@ -67,6 +68,7 @@ const TheContent = () => {
console.log("res id ", result.data.id);
if(data.jsessionid !== result.data.id){
setUserId(result.data.id);
setGotUserId(true);
}
}
@ -174,7 +176,7 @@ const TheContent = () => {
render={(props) =>
isDataFetched ?
get_token_from_storage_or_cookie() !== null ? (
<route.component {...props} userid={UserId} email={UserData.email} />
<route.component {...props} userid={UserId} email={UserData.email} gotuserid={GotUserId} />
) : (
<Redirect to={{ pathname: "/sso" }} />
)