clean AF handling of function type with typescript and passing down to context provider types and shit

This commit is contained in:
talksik
2022-05-07 11:10:38 -05:00
parent f0120b19cf
commit 8d875ef785
6 changed files with 50 additions and 17 deletions
@@ -20,6 +20,7 @@ export default function ProtectedRoute({
isLoading: serverLoading,
isSuccess: isServerHealthy,
error: serverStatusError,
isFetching: serverFetching,
} = useServerCheck();
const { isLoading, isError, isFetching, isSuccess, refetch } = useAuthCheck(
@@ -59,6 +60,7 @@ export default function ProtectedRoute({
refetch();
}, [jwtToken]);
// first time loading
if (serverLoading)
return (
<span className="text-md text-gray-400 flex items-center justify-center flex-1 text-center p-5 h-screen">