diff options
Diffstat (limited to 'client/app.jsx')
-rw-r--r-- | client/app.jsx | 41 |
1 files changed, 6 insertions, 35 deletions
diff --git a/client/app.jsx b/client/app.jsx index 556623f..5ae62df 100644 --- a/client/app.jsx +++ b/client/app.jsx @@ -1,39 +1,10 @@ -import { useState } from 'react'; -import { setConstantValue } from 'typescript'; - -const App = () => { - const [email, setEmail] = useState(''); - const [password, setPassword] = useState(''); - - const submit = () => { - fetch('/sign_in', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ email, password }), - }); - }; +import { BrowserRouter } from 'react-router-dom'; +import { Router } from './components/router'; +export const App = () => { return ( - <> - <div> - <input - type="email" - value={email} - onChange={(e) => setEmail(e.target.value)} - /> - </div> - <div> - <input - type="password" - value={password} - onChange={(e) => setPassword(e.target.value)} - /> - </div> - <button type="button" onClick={submit}>Login</button> - </> + <BrowserRouter> + <Router /> + </BrowserRouter> ); }; - -export default App; |