You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
554 B
25 lines
554 B
import { Container, Button } from '@mui/material'; |
|
import { AuthForm } from './Components/AuthForm'; |
|
import { useAuth } from './Contexts/AuthContext'; |
|
function App() { |
|
const { user, signOut } = useAuth(); |
|
console.log(user); |
|
const handleSignOut = (e) => { |
|
e.preventDefault(); |
|
signOut(); |
|
}; |
|
|
|
return ( |
|
<> |
|
<Container maxWidth="xs"> |
|
{!user ? ( |
|
<AuthForm /> |
|
) : ( |
|
<Button onClick={(e) => handleSignOut(e)}>wewlad signout</Button> |
|
)} |
|
</Container> |
|
</> |
|
); |
|
} |
|
|
|
export default App;
|
|
|