use authenticated status
This commit is contained in:
parent
63efcc4b37
commit
df0a0f22b8
|
@ -28,7 +28,7 @@ const Navigation = ({ mode, uri }) => {
|
|||
const [open, setOpen] = React.useState(false);
|
||||
const windowSize = useWindowSize();
|
||||
const isWindowTop = useWindowTop();
|
||||
const { authenticated } = useAuthenticatedStatus();
|
||||
const { data: authenticated } = useAuthenticatedStatus();
|
||||
|
||||
console.log(authenticated);
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import useSWR from "swr";
|
||||
|
||||
const fetcher = (url) => fetch(url).then((response) => response.json());
|
||||
|
||||
export default function useAuthenticatedStatus() {
|
||||
return useSWR("/__internal/do/not/use/authenticated", (url) => fetch(url).then((response) => response.json()));
|
||||
return useSWR("/__internal/do/not/use/authenticated", fetcher);
|
||||
}
|
||||
|
|
Reference in New Issue