docs: 🚑 when not authorized, user will be redirect to request early access

Signed-off-by: jffarge <jf@dagger.io>
This commit is contained in:
jffarge 2021-06-28 16:12:20 +02:00
parent 7cbb160f4e
commit 14062c3c38

View File

@ -151,8 +151,8 @@ function DocPage(props) {
useEffect(async () => {
if (!isEmpty(authQuery) && userAccessStatus === null) { //callback after successful auth with github
const user = await checkUserCollaboratorStatus(authQuery.code);
setUserAccessStatus(user)
if (user?.permission) {
setUserAccessStatus(user)
if (typeof window !== "undefined") window.localStorage.setItem('user', JSON.stringify(user));
}
}