Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1a1015c
complete navbar and hero section
AhmedMohamed809 Mar 7, 2023
a0a9425
add invite friends button
AhmedMohamed809 Mar 8, 2023
e86326d
Create your profile page
levilu800b Mar 9, 2023
91a9869
first commit
rebwar1 Mar 9, 2023
790a4bb
createTable
rebwar1 Mar 10, 2023
8efba66
add client-side sidebar add user show user
rebwar1 Mar 10, 2023
42cc92a
remove ../../assets/scss/header.scss
rebwar1 Mar 10, 2023
48b22a9
Merge branch 'Create-my-Profile-page-Levi' into Demo-Branch
levilu800b Mar 10, 2023
769e25f
add DATABASE_URL=
rebwar1 Mar 10, 2023
9439298
link create profile page to home page
AhmedMohamed809 Mar 10, 2023
f565a04
Ready for Rebwar
levilu800b Mar 11, 2023
053abf6
fix to deploy
rebwar1 Mar 11, 2023
643b759
fix lint error
rebwar1 Mar 11, 2023
1fd0b34
Merge remote-tracking branch 'origin/main-rebwar' into Demo-Branch
levilu800b Mar 11, 2023
23d8f80
add navbar as global
AhmedMohamed809 Mar 11, 2023
0d11ead
Merge branch 'Demo-Branch' of https://github.com/levilu800b/DALR-Lang…
AhmedMohamed809 Mar 11, 2023
c186fbe
Merge branch 'Demo-Branch' of https://github.com/levilu800b/DALR-Lang…
AhmedMohamed809 Mar 11, 2023
5ad4054
bug fix on the demo branch
levilu800b Mar 11, 2023
0bcba91
Sign and dashboard
levilu800b Mar 13, 2023
ae749f9
add header to profile page
AhmedMohamed809 Mar 13, 2023
1829d88
fixed navbar to show on all routes
levilu800b Mar 13, 2023
1413d47
fixing bugs
levilu800b Mar 13, 2023
a7641ba
Dashboard not fully fixed
levilu800b Mar 13, 2023
cbd8b00
add ListUsers and server/public
rebwar1 Mar 14, 2023
bb6fda3
fix issues
levilu800b Mar 14, 2023
f0c3d16
Sidebar issue fix
levilu800b Mar 14, 2023
3216867
updates for sidebar
levilu800b Mar 14, 2023
deec9be
Merge branch 'Sidebar-fix-Levi' into Demo-Branch
levilu800b Mar 14, 2023
4861e3f
updated components
levilu800b Mar 14, 2023
3d5b9ff
i jsonwebtoken bcrypt
rebwar1 Mar 15, 2023
66f50e2
JWT Registration/Login system server
rebwar1 Mar 15, 2023
9cc8679
fix verify
rebwar1 Mar 16, 2023
b1f117c
jwt auth frontEnd
rebwar1 Mar 16, 2023
9c0b1aa
sidebar logout done
rebwar1 Mar 16, 2023
565f47f
some bootsrap style
rebwar1 Mar 16, 2023
99a42b4
resolve a fetch("/api/verify
rebwar1 Mar 16, 2023
8b34492
style profile
rebwar1 Mar 16, 2023
dea6f83
get all users
rebwar1 Mar 16, 2023
2b577eb
add notification
rebwar1 Mar 16, 2023
2da8399
log in front done
rebwar1 Mar 16, 2023
9ce73ca
fix it to wotking
rebwar1 Mar 17, 2023
d834f74
update backEnd and FrontEnd in order to chane Table database for inse…
rebwar1 Mar 17, 2023
0599f7b
add pur rquest to backEnd
rebwar1 Mar 17, 2023
c107c73
l
rebwar1 Mar 17, 2023
0f14760
update login backend
rebwar1 Mar 17, 2023
dd669bb
updata
rebwar1 Mar 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 87 additions & 8 deletions client/src/App.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,92 @@
import { Route, Routes } from "react-router-dom";
import { useState, useEffect } from "react";
import "react-toastify/dist/ReactToastify.css";
import {
BrowserRouter as Router,
Routes,
Route,
Navigate,
} from "react-router-dom";
import { toast } from "react-toastify";

import About from "./pages/About";
import CreateYourProfilePage from "./components/CreateProfile/CreateYourProfilePage";
import About from "./components/About/About";
import Contact from "./components/Contact/Contact";
import Home from "./pages/Home";
import Login from "./components/Sign-In/SignIn";
import Register from "./components/Sign-Up/SignUp";
import Dashboard from "./components/Dashboard/Dashboard";
import NavBar from "./components/HomePage/NavBar/NavBar";

const App = () => (
<Routes>
<Route path="/" element={<Home />} />
<Route path="/about/this/site" element={<About />} />
</Routes>
);
toast.configure();

function App() {
const [isAuthenticated, setIsAuthenticated] = useState(false);

const checkAuthenticated = async () => {
try {
const res = await fetch("/api/verify", {
method: "GET",
headers: { token: localStorage.token },
});

const parseRes = await res.json();

parseRes === true ? setIsAuthenticated(true) : setIsAuthenticated(false);
} catch (err) {
console.error(err.message);
}
};

useEffect(() => {
checkAuthenticated();
}, []);

const setAuth = (boolean) => {
setIsAuthenticated(boolean);
};

return (
<div>
<NavBar isAuthenticated={isAuthenticated} setAuth={setAuth} />
<Routes>
<Route path="/" element={<Home />} />
<Route path="/createprofile" element={<CreateYourProfilePage />} />
<Route path="/about" element={<About />} />
<Route path="/contact" element={<Contact />} />

<Route
path="/signin"
element={
!isAuthenticated ? (
<Login setAuth={setAuth} />
) : (
<Navigate to="/dashboard" replace />
)
}
/>
<Route
path="/signup"
element={
!isAuthenticated ? (
<Register setAuth={setAuth} />
) : (
<Navigate to="/dashboard" replace />
)
}
/>
<Route
path="/dashboard"
element={
isAuthenticated ? (
<Dashboard setAuth={setAuth} />
) : (
<Navigate to="/signin" replace />
)
}
/>
</Routes>
</div>
);
}

export default App;
Binary file added client/src/assets/bg1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/src/assets/bg2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions client/src/assets/css/general.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@font-face {
font-family: PlayfairDisplay;
src: url(../fonts/PlayfairDisplay.ttf);
}

body {
font-family: PlayfairDisplay !important;
}
.content {
margin: 2em 5em;
background-color: #d4e3e4;
padding: 2em;
}
.header h2 {
color: white;
font-size: 25px;
text-align: center;
}
Binary file added client/src/assets/fonts/PlayfairDisplay.ttf
Binary file not shown.
Binary file added client/src/assets/profile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions client/src/assets/scss/dashboard.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.dashboard {
line-height: 30px;
}
.Required {
font-size: 1rem;
font-weight: 600;
color: red;
}
7 changes: 7 additions & 0 deletions client/src/assets/scss/footer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
footer {
text-align: center;
}
.pfooter {
font-size: 1.5rem;
font-weight: 600;
}
5 changes: 5 additions & 0 deletions client/src/assets/scss/header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.header h2 {
color: white;
font-size: 25px;
text-align: center;
}
Empty file.
9 changes: 9 additions & 0 deletions client/src/components/About/About.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from "react";

const About = () => {
return (
<div>About</div>
);
};

export default About;
Empty file.
9 changes: 9 additions & 0 deletions client/src/components/AddUser/AddUser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from "react";

const AddUser = () => {
return (
<div>Add User</div>
);
};

export default AddUser;
Empty file.
9 changes: 9 additions & 0 deletions client/src/components/Contact/Contact.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from "react";

const Contact = () => {
return (
<div>Contact</div>
);
};

export default Contact;
77 changes: 77 additions & 0 deletions client/src/components/CreateProfile/CreateYourProfilePage.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/* Global styles */
* {
box-sizing: border-box;
}

body {
font-family: Arial, sans-serif;
margin: 0;
}

h1 {
font-size: 2rem;
margin: 1rem 0;
}

.form-group {
margin: 1rem 0;
}

label {
display: block;
font-weight: bold;
margin-bottom: 0.5rem;
}

input,
button {
font-size: 1rem;
padding: 0.5rem;
border-radius: 0.25rem;
border: 1px solid #ccc;
}

input:focus,
button:focus {
outline: none;
border-color: #4d90fe;
box-shadow: 0 0 5px #4d90fe;
}

button {
background-color: #4d90fe;
color: #fff;
cursor: pointer;
margin-right: 1rem;
}

button:hover {
background-color: #357ae8;
}

/* Styles for the CreateProfilePage component */
.create-profile-page {
max-width: 800px;
margin: 0 auto;
padding: 2rem;
}

@media screen and (max-width: 600px) {
.create-profile-page {
padding: 1rem;
}
}

@media screen and (max-width: 400px) {
input,
button {
font-size: 0.8rem;
padding: 0.25rem;
}
}

@media screen and (max-width: 300px) {
h1 {
font-size: 1.5rem;
}
}
Loading