Skip to content

Commit c25b7da

Browse files
author
Atharv-2002-Kulkarni
committed
add_database
1 parent 40c279a commit c25b7da

File tree

688 files changed

+110831
-20
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

688 files changed

+110831
-20
lines changed

client/package-lock.json

+139
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@
66
"@testing-library/jest-dom": "^5.16.2",
77
"@testing-library/react": "^12.1.2",
88
"@testing-library/user-event": "^13.5.0",
9+
"axios": "^0.26.0",
910
"node-modules": "^1.0.1",
1011
"react": "^17.0.2",
1112
"react-dom": "^17.0.2",
13+
"react-router": "^6.2.1",
14+
"react-router-dom": "^5.3.0",
1215
"react-scripts": "5.0.0",
1316
"web-vitals": "^2.1.4"
1417
},

client/src/App.js

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
import logo from './logo.svg';
21
import './App.css';
32
import Login from './Components/Login';
4-
3+
import signup from './Components/signup';
4+
import { BrowserRouter as Router,Route,Switch } from 'react-router-dom';
55
function App() {
6-
return (
7-
<div>
8-
<Login />
9-
</div>
6+
return (
7+
<Router>
8+
<Switch>
9+
<Route exact path={'/'} component={Login} />
10+
<Route exact path={'/signup.js'} component={signup} />
11+
</Switch>
12+
</Router>
1013
);
1114
}
1215

client/src/Components/Login.css

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
*{
32
font-family: 'Roboto', sans-serif;
43

@@ -24,7 +23,7 @@
2423
}
2524

2625
.main::before{
27-
background: url("../pexels-johannes-plenio-1103970.jpg")no-repeat center center/cover;
26+
background: url("D:/projectws/FindPartner/client/public/pexels-johannes-plenio-1103970.jpg")no-repeat center center/cover;
2827
content: "";
2928
position: absolute;
3029
width: 100%;

client/src/Components/Login.js

+26-10
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
1-
import React from "react";
1+
import React,{useState} from "react";
2+
import Axios from "axios";
3+
import { Link } from "react-router-dom";
24
import "./Login.css";
35
function Login() {
6+
const [userEmail,setuserEmail]=useState("");
7+
const [userPassword,setuserPassword]=useState("");
8+
const createinfo=()=>{
9+
Axios.post("http://localhost:3001/createinfo",{
10+
userEmail: userEmail,
11+
userPassword: userPassword,
12+
});
13+
}
14+
415
return (
5-
<>
6-
7-
<div class="main">
16+
<div className="main">
817
<link rel="preconnect" href="https://fonts.googleapis.com"></link>
918
<form>
10-
<section class="container">
19+
<section className="container">
1120
<header>
1221
<h1>Log In to ProjectPartner</h1>
1322
</header>
1423
<p>
15-
<label for="email">E-Mail</label>
24+
<label htmlFor="email">E-Mail</label>
1625
<br></br>
1726
<input
1827
type="email"
@@ -21,10 +30,13 @@ function Login() {
2130
required
2231
placeholder="📧"
2332
autoComplete="off"
33+
onChange={(event)=>{
34+
setuserEmail(event.target.value);
35+
}}
2436
/>
2537
</p>
2638
<p>
27-
<label for="password">Password</label>
39+
<label htmlFor="password">Password</label>
2840
<br></br>
2941

3042
<input
@@ -33,15 +45,19 @@ function Login() {
3345
id="password"
3446
required
3547
placeholder="&#128274;"
36-
autoComplete="off"/>
48+
autoComplete="off"
49+
onChange={(event)=>{
50+
setuserPassword(event.target.value);
51+
}}
52+
/>
3753
</p>
3854
<p>
39-
<input type="button" name="button" id="btn" value="Login" />
55+
<input type="button" name="button" id="btn" value="Login" onClick={createinfo}/>
56+
<Link to={'/signup.js'}>signup</Link>
4057
</p>
4158
</section>
4259
</form>
4360
</div>
44-
</>
4561
);
4662
}
4763

client/src/Components/signup.css

Whitespace-only changes.

client/src/Components/signup.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React from "react";
2+
import { Link } from "react-router-dom";
3+
function signup() {
4+
return (
5+
<div>
6+
Hi
7+
kdsafoiawrgvonar
8+
dsfoubavoasd
9+
vowbro
10+
<input type="text"></input>
11+
<Link to={'/'}>Login</Link>
12+
</div>
13+
);
14+
}
15+
16+
export default signup;

client/src/index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ import React from 'react';
22
import ReactDOM from 'react-dom';
33
import './index.css';
44
import App from './App';
5+
import { BrowserRouter } from 'react-router-dom';
56
import reportWebVitals from './reportWebVitals';
67

78
ReactDOM.render(
8-
<React.StrictMode>
9+
<BrowserRouter>
910
<App />
10-
</React.StrictMode>,
11+
</BrowserRouter>,
1112
document.getElementById('root')
1213
);
1314

server/node_modules/.bin/mime

+15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/node_modules/.bin/mime.cmd

+17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)