use authenticated status

This commit is contained in:
Karol Wypchlo 2021-04-08 14:02:35 +02:00
parent b4231abfb6
commit 63efcc4b37
3 changed files with 4 additions and 2 deletions

View File

@ -464,7 +464,7 @@ server {
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;
charset utf-8;

View File

@ -30,6 +30,8 @@ const Navigation = ({ mode, uri }) => {
const isWindowTop = useWindowTop();
const { authenticated } = useAuthenticatedStatus();
console.log(authenticated);
React.useEffect(() => {
setOpen(false);
}, [windowSize, setOpen, uri]);

View File

@ -1,5 +1,5 @@
import useSWR from "swr";
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()));
}