🩹 front: When not logged in using a public link do not redirect to login (#315)
This commit is contained in:
committed by
ericlinagora
parent
75428b9186
commit
14ecf202db
@@ -1,7 +1,6 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
import MenusBodyLayer from '@components/menus/menus-body-layer';
|
||||
import JWTStorage from '@features/auth/jwt-storage-service';
|
||||
import Api from '@features/global/framework/api-service';
|
||||
import Languages from '@features/global/services/languages-service';
|
||||
import { addApiUrlIfNeeded } from '@features/global/utils/URLUtils';
|
||||
@@ -136,12 +135,7 @@ const AccessChecker = ({
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
await setPublicToken(token || '');
|
||||
})();
|
||||
}, []);
|
||||
|
||||
useEffect(() => void setPublicToken(token || ''), []);
|
||||
|
||||
if ((!details?.item?.id && !loading) || accessGranted === false) {
|
||||
return (
|
||||
@@ -179,5 +173,7 @@ const AccessChecker = ({
|
||||
);
|
||||
}
|
||||
|
||||
if (!accessGranted)
|
||||
return <></>;
|
||||
return <>{children}</>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user