App.js 459 Bytes
Newer Older
이재연's avatar
병합    
이재연 committed
1
2
3
import logo from './logo.svg';
import './App.css';
import { Button } from 'react-bootstrap';
이재연's avatar
이재연 committed
4
5
6
7
8
import { Router } from 'react-router-dom';
import Login from './Login'
import LogoutButton from './LogoutButton'
import {signIn} from './auth'

이재연's avatar
병합    
이재연 committed
9
10

function App() {
이재연's avatar
이재연 committed
11
12
13
14
15
16
17
18
19
  const [user,setUser]=useState(null);

  const authenticated =user !=null;

  const login =({id, password}) => setUser(signIn({id,password}));

  const logout=()=>setUser(null);


이재연's avatar
병합    
이재연 committed
20
21
22
}

export default App;