update user_id 16
This commit is contained in:
@ -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" }} />
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user