Merge pull request #1794 from slumbering/issue#1793-docs-redirection
[docs] fix query string checking to avoid wrong redirection
This commit is contained in:
commit
35751bc212
@ -14,8 +14,8 @@ function DocPageCustom({ location, userAccessStatus, setUserAccessStatus }) {
|
|||||||
|
|
||||||
useEffect(async () => {
|
useEffect(async () => {
|
||||||
NProgress.start()
|
NProgress.start()
|
||||||
if (!isEmpty(authQuery) && userAccessStatus === null) { //callback after successful auth with github
|
if (!isEmpty(authQuery?.code) && userAccessStatus === null) { //callback after successful auth with github
|
||||||
const user = await checkUserCollaboratorStatus(authQuery.code);
|
const user = await checkUserCollaboratorStatus(authQuery?.code);
|
||||||
setUserAccessStatus(user)
|
setUserAccessStatus(user)
|
||||||
if (user?.permission) {
|
if (user?.permission) {
|
||||||
window.localStorage.setItem('user', JSON.stringify(user));
|
window.localStorage.setItem('user', JSON.stringify(user));
|
||||||
|
Reference in New Issue
Block a user