getting user in app

This commit is contained in:
Carter 2024-10-24 12:21:52 -06:00
parent 90fd2905fb
commit 28b8578605
6 changed files with 62 additions and 25 deletions

View file

@ -3,8 +3,10 @@ import { or } from '../utils/types'
import AuthWrapper from '../providers/auth'
import HTTPProvider from '../providers/http'
import App from './App'
import { useState } from 'react'
function AuthHTTPWrapper() {
const [gotToken, setGotToken] = useState(false)
let url: string | undefined = window.location.origin;
let audience: string | undefined;
@ -30,8 +32,12 @@ function AuthHTTPWrapper() {
cacheLocation='localstorage'
>
<AuthWrapper>
<HTTPProvider>
<App/>
<HTTPProvider setGotToken={setGotToken}>
{gotToken ?
<App/>
:
<p>hi</p>
}
</HTTPProvider>
</AuthWrapper>
</Auth0Provider>