Skip to content

Commit 340ca9e

Browse files
authored
Merge pull request #2 from GDSC-RTU/Tapish
Tapish
2 parents 5e21652 + 7da7464 commit 340ca9e

File tree

15 files changed

+1368
-25
lines changed

15 files changed

+1368
-25
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
# misc
1515
.DS_Store
16+
.env
1617
.env.local
1718
.env.development.local
1819
.env.test.local

frontend/package-lock.json

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

frontend/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"@testing-library/user-event": "^13.5.0",
1010
"react": "^18.2.0",
1111
"react-dom": "^18.2.0",
12+
"react-icons": "^4.8.0",
13+
"react-router-dom": "^6.10.0",
1214
"react-scripts": "5.0.1",
1315
"web-vitals": "^2.1.4"
1416
},

frontend/src/App.js

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
1-
import logo from './logo.svg';
2-
import './App.css';
1+
import { Routes, Route } from "react-router-dom";
2+
import HomePage from "./pages/home";
3+
import SignUpPage from "./pages/signup";
4+
import LoginPage from "./pages/login";
35

46
function App() {
57
return (
6-
<div className="App">
7-
<header className="App-header">
8-
<img src={logo} className="App-logo" alt="logo" />
9-
<p>
10-
Edit <code>src/App.js</code> and save to reload.
11-
</p>
12-
<a
13-
className="App-link"
14-
href="https://reactjs.org"
15-
target="_blank"
16-
rel="noopener noreferrer"
17-
>
18-
Learn React
19-
</a>
20-
</header>
21-
</div>
8+
<>
9+
<Routes>
10+
<Route path='/' element={<HomePage />}/>
11+
<Route path='/login' element={<LoginPage />}/>
12+
<Route path='/signup' element={<SignUpPage />}/>
13+
</Routes>
14+
</>
2215
);
2316
}
2417

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
.inputItem{
2+
text-align: justify;
3+
padding: 10px 20px;
4+
width: 100%;
5+
min-width: 300px;
6+
margin: auto;
7+
display: flex;
8+
justify-content: space-between;
9+
align-items: center;
10+
}
11+
12+
.inputItem input{
13+
border: 1px solid skyblue;
14+
border-radius: 5px;
15+
outline: none;
16+
background-color: white;
17+
padding: 5px 10px;
18+
margin: 0 10px;
19+
}
20+
21+
.inputItem label{
22+
text-transform: capitalize;
23+
font-family: monospace;
24+
font-size: large;
25+
}
26+
.btnDiv{
27+
text-align: center;
28+
padding: 10px 0;
29+
}
30+
31+
.submitBtn{
32+
background-color: rgb(0, 169, 87);
33+
padding: 10px;
34+
border: none;
35+
border-radius: 5px;
36+
color: white;
37+
display: inline-block;
38+
font-size: 1em;
39+
transition: all ease-in-out 300ms;
40+
}
41+
42+
.submitBtn:hover{
43+
cursor: pointer;
44+
background-color: rgb(0, 186, 96);
45+
}
46+
47+
.submitBtn:disabled{
48+
background-color: rgb(1, 111, 58);
49+
color: rgb(214, 214, 214);
50+
cursor: default;
51+
52+
}
53+
54+
55+

frontend/src/components/form.jsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import React from "react";
2+
import styles from './css/form.module.css'
3+
4+
function InputItem({type, Lable, val, setVal}){
5+
6+
return (<>
7+
<div className={styles.inputItem}>
8+
<label htmlFor={Lable}>{Lable}:</label>
9+
<input type={type} name={Lable} id={Lable} value={val} onChange={(e)=>setVal(e.target.value)}/>
10+
</div>
11+
</>)
12+
13+
}
14+
15+
function SubmitButton({text, onClickHandler, active}){
16+
17+
return(<>
18+
<div className={styles.btnDiv}>
19+
<button disabled={!active} className={styles.submitBtn} type="submit" onClick={onClickHandler}>{text}</button>
20+
</div>
21+
</>)
22+
}
23+
24+
export {InputItem, SubmitButton};
25+

frontend/src/config/firebaseConfig.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { initializeApp } from "firebase/app";
2+
import {getAuth} from "firebase/auth"
3+
// TODO: Add SDKs for Firebase products that you want to use
4+
// https://firebase.google.com/docs/web/setup#available-libraries
5+
6+
// Your web app's Firebase configuration
7+
const firebaseConfig = {
8+
apiKey: process.env.REACT_APP_API_KEY,
9+
authDomain: process.env.REACT_APP_AUTH_DOMAIN,
10+
projectId: process.env.REACT_APP_PROJECT_ID,
11+
storageBucket: process.env.REACT_APP_STORAGE_BUCKET,
12+
messagingSenderId: process.env.REACT_APP_MESSANGING_SENDER_ID,
13+
appId: process.env.REACT_APP_APP_ID
14+
};
15+
16+
// Initialize Firebase
17+
const app = initializeApp(firebaseConfig);
18+
const auth = getAuth(app);
19+
20+
export {auth};
21+
export default app;
22+

frontend/src/index.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
*{
2+
margin: 0;
3+
padding: 0;
4+
box-sizing: border-box;
5+
}
6+
17
body {
28
margin: 0;
39
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',

frontend/src/index.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom/client';
33
import './index.css';
4-
import App from './App';
5-
import reportWebVitals from './reportWebVitals';
4+
import App from './App';
5+
import { BrowserRouter } from 'react-router-dom'
6+
67

78
const root = ReactDOM.createRoot(document.getElementById('root'));
89
root.render(
910
<React.StrictMode>
10-
<App />
11+
<BrowserRouter>
12+
<App />
13+
</BrowserRouter>
1114
</React.StrictMode>
1215
);
1316

14-
// If you want to start measuring performance in your app, pass a function
15-
// to log results (for example: reportWebVitals(console.log))
16-
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17-
reportWebVitals();
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
.container{
2+
/* background-color: azure; */
3+
display: flex;
4+
width: 100%;
5+
height: 100vh;
6+
min-height: 600px;
7+
justify-content: center;
8+
align-items: center;
9+
}
10+
.container>div{
11+
border: 1px solid rgb(232, 232, 232);
12+
height: min-content;
13+
padding: 10px;
14+
}
15+
.container h1{
16+
text-align: center;
17+
padding: 10px 0px;
18+
}
19+
.formControl{
20+
display: flex;
21+
width: 100%;
22+
justify-content: center;
23+
align-items: center;
24+
25+
}
26+
.Errors{
27+
height: 60px;
28+
padding: 10px;
29+
}
30+
.error{
31+
background-color: lightcoral;
32+
padding: 10px 2px;
33+
color: red;
34+
text-align: center;
35+
border-radius: 5px;
36+
width: 300px;
37+
margin: 0 auto;
38+
}
39+
40+
.Google{
41+
text-align: center;
42+
padding: 5px 0;
43+
display: flex;
44+
width: 100%;
45+
flex-direction: column;
46+
align-items: center;
47+
}
48+
.Google>p{
49+
margin: 5px 0;
50+
}
51+
.GoogleBtn{
52+
align-items: center;
53+
display: flex;
54+
border: 1px solid rgb(117, 117, 251);
55+
min-width: 200px;
56+
margin: 5px 0;
57+
58+
}
59+
60+
.GoogleBtn:hover{
61+
cursor: pointer;
62+
}
63+
64+
.GoogleBtn:hover>.GoogleText{
65+
background-color: rgb(72, 129, 236);
66+
}
67+
68+
.GoogleText{
69+
padding: 10px 5px;
70+
color: white;
71+
background-color: cornflowerblue;
72+
flex-grow: 1;
73+
}
74+
.GoogleImg{
75+
width: 30px;
76+
height: auto;
77+
}
78+
79+
.line{
80+
width: 100%;
81+
border-bottom: 1px solid rgb(186, 186, 186);
82+
margin: 10px 0;
83+
}
84+
85+
.center{
86+
padding: 5px 20px;
87+
text-align: left;
88+
}
89+
90+
91+

0 commit comments

Comments
 (0)