Created
January 6, 2020 21:08
-
-
Save ayoisaiah/d0fa764908c03da7e2c15cb782b057cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect } from 'react'; | |
import './App.css'; | |
import { useAuth0 } from './auth0'; | |
import ChatView from './Chat'; | |
function App() { | |
useEffect(() => {}, []); | |
const { loading, user, loginWithRedirect } = useAuth0(); | |
if (loading) { | |
return <div>Loading...</div>; | |
} | |
return ( | |
<div className="App"> | |
{!user && loginWithRedirect({})} | |
{user && <ChatView />} | |
</div> | |
); | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment