init login
This commit is contained in:
parent
b73b9a4c78
commit
8989b263ce
@ -8,6 +8,7 @@
|
|||||||
"@testing-library/user-event": "^13.5.0",
|
"@testing-library/user-event": "^13.5.0",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
|
"react-router-dom": "^6.18.0",
|
||||||
"react-scripts": "5.0.1",
|
"react-scripts": "5.0.1",
|
||||||
"web-vitals": "^2.1.4"
|
"web-vitals": "^2.1.4"
|
||||||
},
|
},
|
||||||
|
19
src/accounts/login/Login.css
Normal file
19
src/accounts/login/Login.css
Normal 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;
|
||||||
|
}
|
19
src/accounts/login/Login.js
Normal file
19
src/accounts/login/Login.js
Normal 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;
|
29
src/index.js
29
src/index.js
@ -1,17 +1,16 @@
|
|||||||
import React from 'react';
|
import ReactDOM from "react-dom/client";
|
||||||
import ReactDOM from 'react-dom/client';
|
import { BrowserRouter, Routes, Route } from "react-router-dom";
|
||||||
import './index.css';
|
import Login from "./accounts/login/Login.js";
|
||||||
import App from './App';
|
|
||||||
import reportWebVitals from './reportWebVitals';
|
export default function App() {
|
||||||
|
return (
|
||||||
|
<BrowserRouter>
|
||||||
|
<Routes>
|
||||||
|
<Route path="*" element={<Login />} />
|
||||||
|
</Routes>
|
||||||
|
</BrowserRouter>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const root = ReactDOM.createRoot(document.getElementById('root'));
|
const root = ReactDOM.createRoot(document.getElementById('root'));
|
||||||
root.render(
|
root.render(<App />);
|
||||||
<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();
|
|
Loading…
Reference in New Issue
Block a user