starting off header with the full window dimensions

This commit is contained in:
talksik
2022-04-30 21:14:03 -05:00
parent b9141d643d
commit 66db28cd7c
14 changed files with 262 additions and 25 deletions
@@ -13,10 +13,11 @@ export default function ProtectedRoute({
}: {
children?: React.ReactNode;
}) {
const { isLoading, isError, isFetching, isSuccess, refetch } = useAuthCheck();
const [jwtToken, setJwtToken] = useRecoilState($jwtToken);
const { isLoading, isError, isFetching, isSuccess, refetch } =
useAuthCheck(jwtToken);
useEffect(() => {
// on load of this, if we already have jwt tokens in store,
// then try using them with auth check
@@ -40,11 +41,13 @@ export default function ProtectedRoute({
if (jwtToken) {
window.electronAPI.store.set(STORE_ITEMS.AUTH_SESSION_JWT, jwtToken);
setJwtToken(jwtToken);
} else {
window.electronAPI.store.set(STORE_ITEMS.AUTH_SESSION_JWT, null);
}
NirvanaApi._jwtToken = jwtToken;
refetch();
}, [jwtToken]);