init login

This commit is contained in:
starnakin 2023-11-15 23:05:08 +01:00
parent b73b9a4c78
commit 8989b263ce
4 changed files with 53 additions and 15 deletions

View File

@ -8,6 +8,7 @@
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.18.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},

View File

@ -0,0 +1,19 @@
:root {
background-color: green;
}
form {
margin-left: auto;
margin-right: auto;
padding: 15px;
width: 360px;
border: 1px black solid;
display: grid;
background-color: red;
}
form>* {
margin-bottom: 2%;
flex: 1 2;
}

View File

@ -0,0 +1,19 @@
import './Login.css';
const Login = () => {
return (
<form>
<label> Username : </label>
<input type="text" name="Username" placeholder="Your Username" />
<label> Password : </label>
<input type="text" name="Password" placeholder="Your Password" />
<input type="submit" value="Envoyer" />
<a href='/register'>signup</a>
</form>
);
};
export default Login;

View File

@ -1,17 +1,16 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import ReactDOM from "react-dom/client";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import Login from "./accounts/login/Login.js";
export default function App() {
return (
<BrowserRouter>
<Routes>
<Route path="*" element={<Login />} />
</Routes>
</BrowserRouter>
);
}
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
root.render(<App />);