Skip to content

Commit 73d3dd6

Browse files
BackendExpertJehanKandyAnupa1998
committed
Update
Co-Authored-By: JehanKandy <[email protected]> Co-Authored-By: Anupa Gamage <[email protected]>
1 parent c9bdb39 commit 73d3dd6

File tree

5 files changed

+300
-12
lines changed

5 files changed

+300
-12
lines changed

client/package-lock.json

Lines changed: 165 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
"dev": "vite",
88
"build": "vite build",
99
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
10-
"preview": "vite preview"
10+
"preview": "vite preview",
11+
"SignInUp": "node node_modules/login-signup-react/index.js --destination=src/components/LoginSignUp"
1112
},
1213
"dependencies": {
1314
"axios": "^1.7.2",
15+
"login-signup-react": "^1.1.0",
1416
"react": "^18.2.0",
1517
"react-dom": "^18.2.0",
1618
"react-icons": "^5.2.1",

client/src/App.jsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
import { BrowserRouter, Route, Routes } from "react-router-dom";
2+
13
export default function App() {
24
return (
3-
<h1 className="text-3xl font-bold underline">
4-
Hello world!
5-
</h1>
5+
<BrowserRouter>
6+
<Routes>
7+
<Route path="/" />
8+
</Routes>
9+
</BrowserRouter>
610
)
711
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import React, { useState } from 'react'
2+
import { BsMortarboardFill } from "react-icons/bs";
3+
import { Link } from 'react-router-dom';
4+
5+
const SignIn = () => {
6+
// for login data
7+
const [LoginData, SetLoginData] = useState({
8+
email: '',
9+
password: ''
10+
})
11+
12+
// send data to backend using axios
13+
const headleSubmit = (e) => {
14+
e.preventDefault();
15+
16+
// login to system
17+
// this will be updated in future versions
18+
}
19+
return (
20+
<div className='bg-gray-200 min-h-screen py-24 px-8'>
21+
<div className="md:grid grid-cols-3 gap-2">
22+
<div className=""></div>
23+
<div className="">
24+
<div className="bg-white py-16 px-8 rounded shadow-md w-full ">
25+
<center className='text-gray-500'>
26+
{/* change the Icon According to your needs */}
27+
<h1 className=''><BsMortarboardFill className='h-20 w-auto'/></h1>
28+
<p className="pt-4 text-2xl">Welcome Back</p>
29+
<p className="">Your Project Name</p>
30+
</center>
31+
<hr className='my-2'/>
32+
<div className="my-4">
33+
<form onSubmit={headleSubmit}>
34+
<div className="my-2 md:mx-8">
35+
<label htmlFor="" className=''>Email : </label>
36+
<input type="email" name="" id="" className="w-full h-12 pl-2 rounded bg-gray-200" required placeholder='Enter Email Address'
37+
onChange={e => SetLoginData({...LoginData, email:e.target.value})}/>
38+
</div>
39+
<div className="my-2 md:mx-8">
40+
<label htmlFor="" className=''>Password : </label>
41+
<input type="password" name="" id="" className="w-full h-12 pl-2 rounded bg-gray-200" required placeholder='Enter Password'
42+
onChange={e => SetLoginData({...LoginData, password:e.target.value})}/>
43+
</div>
44+
<div className="my-2 md:mx-8">
45+
<button type='submit' className='mt-8 font-semibold w-full py-4 px-8 rounded bg-blue-500 text-white shadow-md duration-500 hover:bg-blue-600'>SignIn</button>
46+
</div>
47+
</form>
48+
<Link><p className="my-2 md:mx-8 text-blue-500 font-semibold">Forget Password ? </p></Link>
49+
</div>
50+
<hr className='my-2'/>
51+
<p className="my-4">Don't have an Account ? <Link to={'/SignUp'}><span className="text-blue-500">SignUp</span></Link></p>
52+
</div>
53+
</div>
54+
<div className=""></div>
55+
</div>
56+
</div>
57+
)
58+
}
59+
60+
export default SignIn

0 commit comments

Comments
 (0)