use authenticated status
This commit is contained in:
parent
b4231abfb6
commit
63efcc4b37
|
@ -464,7 +464,7 @@ server {
|
||||||
proxy_pass http://127.0.0.1/$uri?attachment=true&$args;
|
proxy_pass http://127.0.0.1/$uri?attachment=true&$args;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /__internal/do/not/use {
|
location /__internal/do/not/use/authenticated {
|
||||||
include /etc/nginx/conf.d/include/cors;
|
include /etc/nginx/conf.d/include/cors;
|
||||||
|
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
|
|
|
@ -30,6 +30,8 @@ const Navigation = ({ mode, uri }) => {
|
||||||
const isWindowTop = useWindowTop();
|
const isWindowTop = useWindowTop();
|
||||||
const { authenticated } = useAuthenticatedStatus();
|
const { authenticated } = useAuthenticatedStatus();
|
||||||
|
|
||||||
|
console.log(authenticated);
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
setOpen(false);
|
setOpen(false);
|
||||||
}, [windowSize, setOpen, uri]);
|
}, [windowSize, setOpen, uri]);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
|
|
||||||
export default function useAuthenticatedStatus() {
|
export default function useAuthenticatedStatus() {
|
||||||
return useSWR("/__internal/do/not/use", (url) => fetch(url).then((response) => response.json()));
|
return useSWR("/__internal/do/not/use/authenticated", (url) => fetch(url).then((response) => response.json()));
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue