import React, {useState} from "react"; import {useHttp} from "./usehttp"; function App() { const {request} = useHttp() const [userName, setUsername] = useState(''); const [Password, setPassword] = useState(''); const authPost = async () => { try { const data = await request('/api/auth/login', 'POST', {username: userName, password: Password}) } catch (e) { } } return (

Авторизация

setUsername(e.target.value)}/>

setPassword(e.target.value)}/>

) } export default App;