diff --git a/client/src/Components/Layout/Navbar/style.css b/client/src/Components/Layout/Navbar/style.css
index 27c6069..99fc989 100644
--- a/client/src/Components/Layout/Navbar/style.css
+++ b/client/src/Components/Layout/Navbar/style.css
@@ -98,7 +98,7 @@ a.nav-item:hover::after {
border-radius: 5px;
background: #fff;
border: 1px solid #28768c;
- box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
+ box-shadow: 0px 0px 10px rgb(0 0 0 / 10%);
transition: all 0.3s ease-in-out;
color: #28768c;
margin: 0 0.5rem;
diff --git a/client/src/Components/Loading/index.jsx b/client/src/Components/Loading/index.jsx
new file mode 100644
index 0000000..555ecc7
--- /dev/null
+++ b/client/src/Components/Loading/index.jsx
@@ -0,0 +1,13 @@
+import { CircularProgress } from "@mui/material";
+import React from "react";
+
+import "./styles.css";
+
+export default function Loading() {
+ return (
+
+
+ جاري التحميل . يرجي الانتظار
+
+ );
+}
diff --git a/client/src/Components/Loading/styles.css b/client/src/Components/Loading/styles.css
new file mode 100644
index 0000000..a5394d7
--- /dev/null
+++ b/client/src/Components/Loading/styles.css
@@ -0,0 +1,18 @@
+.loading__container {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 90vh;
+ font-size: 2.25rem;
+ line-height: 2.5rem;
+ color: #26829b;
+ flex-direction: column;
+ font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
+}
+
+.loading__container span {
+ font-size: 1.5rem;
+ line-height: 1.5rem;
+ margin-top: 1.1rem;
+}
+
diff --git a/client/src/Components/index.js b/client/src/Components/index.js
index c81f99a..d6ce976 100644
--- a/client/src/Components/index.js
+++ b/client/src/Components/index.js
@@ -5,6 +5,7 @@ import { TopGymCards, JoinUs, OfferForYou, Slider } from "./HomePage";
import { Navbar, Footer } from "./Layout";
import { GymReviews, GymProfile, GymImages } from "./SingleGym";
import Login from "./LoginPage";
+import Loading from "./Loading";
export {
Filter,
@@ -23,4 +24,5 @@ export {
UpdateProfile,
UploadImages,
Login,
+ Loading,
};
diff --git a/client/src/app.css b/client/src/app.css
index a709071..d97703b 100644
--- a/client/src/app.css
+++ b/client/src/app.css
@@ -56,12 +56,12 @@ body #root {
/* Handle */
::-webkit-scrollbar-thumb {
- background: #276678;
+ background: #b0b0b0;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
- background: #1b4a57;
+ background: #717171;
}
select,
@@ -114,6 +114,7 @@ a:focus {
}
.sub__container {
+ width: 100%;
padding-left: 50px;
padding-right: 50px;
}
@@ -139,7 +140,8 @@ a:focus {
@media screen and (min-width: 1600px) {
.sub__container {
max-width: 1600px;
- margin: 0 auto;
+ margin-left: auto;
+ margin-right: auto;
}
}
diff --git a/client/src/index.js b/client/src/index.js
index 8edd643..50d5a7b 100644
--- a/client/src/index.js
+++ b/client/src/index.js
@@ -1,17 +1,22 @@
-import React from "react";
+import React, { lazy, Suspense } from "react";
import ReactDOM from "react-dom/client";
import { Provider } from "react-redux";
import { BrowserRouter as Router } from "react-router-dom";
-import App from "./App";
+import { Loading } from "./Components";
+
import store from "./Store";
import Theme from "./Theme";
+const AppPage = lazy(() => import("./App"));
+
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
-
+ }>
+
+
diff --git a/package.json b/package.json
index 2ebf67e..9084cbd 100644
--- a/package.json
+++ b/package.json
@@ -12,6 +12,7 @@
"start": "NODE_ENV=production node ./dist",
"lint-server": "eslint --fix --ext .js,.ts server/",
"db:build": "cross-env DB_BUILD=true NODE_ENV=dev ts-node ./server/database/fakeData/index.ts",
+ "db:build-production": "cross-env DB_BUILD=true NODE_ENV=production ts-node ./server/database/fakeData/index.ts",
"heroku-postbuild": " cd client && npm i && npm run build",
"tsc": "tsc",
"postinstall": "npm run tsc"
diff --git a/server/database/fakeData/images.json b/server/database/fakeData/images.json
index 129b092..9cf6beb 100644
--- a/server/database/fakeData/images.json
+++ b/server/database/fakeData/images.json
@@ -1,18 +1,13 @@
{
"images": [
- {
- "pathUrl": "https://user-images.githubusercontent.com/38624002/170736504-90b92b94-1971-4345-894a-b8c9c4c3ecaa.jpg",
- "publicKey": "gyms/170736504-90b92b94-1971-4345-894a-b8c9c4c3ecaa",
- "gymId": 1
- },
{
"pathUrl": "https://user-images.githubusercontent.com/38624002/170736675-75716bd3-7465-4e62-bcef-c054f563ef4d.jpg",
- "publicKey": "gyms/170736675-75716bd3-7465-4e62-bcef-c054f563ef4d",
+ "publicKey": "gyms/170736504-90b92b94-1971-4345-894a-b8c9c4c3ecaa",
"gymId": 1
},
{
"pathUrl": "https://user-images.githubusercontent.com/38624002/170736846-2ab7b88e-0cbe-437f-aae5-c9c29927d11d.jpg",
- "publicKey": "gyms/170736846-2ab7b88e-0cbe-437f-aae5-c9c29927d11d",
+ "publicKey": "gyms/170736675-75716bd3-7465-4e62-bcef-c054f563ef4d",
"gymId": 1
},
{