getting user in app
This commit is contained in:
parent
90fd2905fb
commit
28b8578605
6 changed files with 62 additions and 25 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue