From a903a58b4eaee6a622c76fbca30db2dedb07bacf Mon Sep 17 00:00:00 2001 From: Aleksander Aaboen <aleksanderaaboen@outlook.com> Date: Fri, 13 May 2022 13:43:46 +0200 Subject: [PATCH] Changed file structure --- webstillas/.gitignore | 2 +- .../mapPage => Assets/Images}/marker.png | Bin .../Images}/profile-png-icon-2.png | Bin .../Images/scaffoldingImages}/Bunnskrue.jpg | Bin .../scaffoldingImages}/Diagonalstang.jpg | Bin .../Enr\303\270rsbjelke.jpg" | Bin .../Images/scaffoldingImages}/Gelender.jpg | Bin .../scaffoldingImages}/Lengdebjelke.jpg | Bin .../Images/scaffoldingImages}/Plank.jpg | Bin .../scaffoldingImages}/Rekkverksramme.jpg | Bin .../Images/scaffoldingImages}/Spir.jpg | Bin .../Images/scaffoldingImages}/Stillaslem.jpg | Bin .../Images/scaffoldingImages}/Trapp.jpg | Bin .../Images}/scaffoldingimg.jpg | Bin webstillas/src/{ => Assets/Styles}/App.css | 0 .../elements => Assets/Styles}/Modal.css | 1 - .../Styles}/Modalscaffolding.css | 0 .../{components => Assets/Styles}/Spinner.css | 0 .../project => Assets/Styles}/addProject.css | 0 .../Styles}/addScaffolding.css | 0 .../elements => Assets/Styles}/card.css | 0 .../src/{ => Assets/Styles}/firebaselogin.css | 0 .../project => Assets/Styles}/map.css | 0 .../mapPage => Assets/Styles}/mapPage.css | 0 .../elements => Assets/Styles}/preView.css | 0 .../projects => Assets/Styles}/projects.css | 0 .../Styles}/scaffolding.css | 0 .../Styles}/scaffoldingCard.css | 0 .../topBar => Assets/Styles}/topBar.css | 7 ++++ .../Styles}/userInfo.css | 0 .../{context => Config}/UserAuthContext.js | 3 +- webstillas/src/{ => Config}/firebase.js | 0 .../constantsFile.js => Constants/apiURL.js} | 0 .../constants.js => Constants/webURL.js} | 0 .../projects => Layout}/tabView/Tab.js | 0 .../projects => Layout}/tabView/Tabs.js | 0 .../{components => Layout}/topBar/topBar.js | 16 ++++----- .../src/{modelData => Middleware}/addData.js | 0 .../deleteProject.js | 2 +- .../{modelData => Middleware}/fetchData.js | 2 +- .../{modelData => Middleware}/postModel.js | 2 +- .../src/{modelData => Middleware}/putData.js | 2 +- webstillas/src/{components => Pages}/Login.js | 6 ++-- .../src/{components => Pages}/Signup.js | 12 +++---- .../project/map.js => Pages/addProjectMap.js} | 18 +++++----- .../scaffold => Pages}/addScaffolding.js | 6 ++-- .../{components/mapPage => Pages}/mapPage.js | 14 ++++---- .../projects => Pages}/projects.js | 14 ++++---- .../scaffolding => Pages}/scaffolding.js | 14 ++++---- .../userinformation => Pages}/userInfo.js | 16 ++++----- webstillas/src/{ => Routes}/App.js | 32 +++++++++--------- .../{components => Routes}/ProtectedRoute.js | 2 +- .../components/{ => Indicators}/Spinner.js | 2 +- .../components/{error => Indicators}/error.js | 2 +- .../project => addproject}/addProject.js | 15 ++++---- webstillas/src/components/error/error.css | 0 .../logistics/project/FormErrors.js | 14 -------- .../{elements/card.js => mainProjectCard.js} | 8 ++--- .../{elements/preView.js => preViewSite.js} | 22 ++++++------ .../scaffoldingCardProject.js | 2 +- .../Modal.js => transferScaffoldingModal.js} | 12 +++---- .../ModalScaffolding.js => projectsModal.js} | 8 ++--- .../{elements => }/scaffoldingCard.js | 6 ++-- webstillas/src/index.js | 2 +- 64 files changed, 125 insertions(+), 139 deletions(-) rename webstillas/src/{components/mapPage => Assets/Images}/marker.png (100%) rename webstillas/src/{components/userinformation => Assets/Images}/profile-png-icon-2.png (100%) rename webstillas/src/{components/scaffolding/images => Assets/Images/scaffoldingImages}/Bunnskrue.jpg (100%) rename webstillas/src/{components/scaffolding/images => Assets/Images/scaffoldingImages}/Diagonalstang.jpg (100%) rename "webstillas/src/components/scaffolding/images/Enr\303\270rsbjelke.jpg" => "webstillas/src/Assets/Images/scaffoldingImages/Enr\303\270rsbjelke.jpg" (100%) rename webstillas/src/{components/scaffolding/images => Assets/Images/scaffoldingImages}/Gelender.jpg (100%) rename webstillas/src/{components/scaffolding/images => Assets/Images/scaffoldingImages}/Lengdebjelke.jpg (100%) rename webstillas/src/{components/scaffolding/images => Assets/Images/scaffoldingImages}/Plank.jpg (100%) rename webstillas/src/{components/scaffolding/images => Assets/Images/scaffoldingImages}/Rekkverksramme.jpg (100%) rename webstillas/src/{components/scaffolding/images => Assets/Images/scaffoldingImages}/Spir.jpg (100%) rename webstillas/src/{components/scaffolding/images => Assets/Images/scaffoldingImages}/Stillaslem.jpg (100%) rename webstillas/src/{components/scaffolding/images => Assets/Images/scaffoldingImages}/Trapp.jpg (100%) rename webstillas/src/{components/projects/images => Assets/Images}/scaffoldingimg.jpg (100%) rename webstillas/src/{ => Assets/Styles}/App.css (100%) rename webstillas/src/{components/projects/elements => Assets/Styles}/Modal.css (99%) rename webstillas/src/{components/scaffolding/elements => Assets/Styles}/Modalscaffolding.css (100%) rename webstillas/src/{components => Assets/Styles}/Spinner.css (100%) rename webstillas/src/{components/logistics/project => Assets/Styles}/addProject.css (100%) rename webstillas/src/{components/logistics/scaffold => Assets/Styles}/addScaffolding.css (100%) rename webstillas/src/{components/projects/elements => Assets/Styles}/card.css (100%) rename webstillas/src/{ => Assets/Styles}/firebaselogin.css (100%) rename webstillas/src/{components/logistics/project => Assets/Styles}/map.css (100%) rename webstillas/src/{components/mapPage => Assets/Styles}/mapPage.css (100%) rename webstillas/src/{components/projects/elements => Assets/Styles}/preView.css (100%) rename webstillas/src/{components/projects => Assets/Styles}/projects.css (100%) rename webstillas/src/{components/scaffolding => Assets/Styles}/scaffolding.css (100%) rename webstillas/src/{components/scaffolding/elements => Assets/Styles}/scaffoldingCard.css (100%) rename webstillas/src/{components/topBar => Assets/Styles}/topBar.css (75%) rename webstillas/src/{components/userinformation => Assets/Styles}/userInfo.css (100%) rename webstillas/src/{context => Config}/UserAuthContext.js (97%) rename webstillas/src/{ => Config}/firebase.js (100%) rename webstillas/src/{modelData/constantsFile.js => Constants/apiURL.js} (100%) rename webstillas/src/{components/constants.js => Constants/webURL.js} (100%) rename webstillas/src/{components/projects => Layout}/tabView/Tab.js (100%) rename webstillas/src/{components/projects => Layout}/tabView/Tabs.js (100%) rename webstillas/src/{components => Layout}/topBar/topBar.js (89%) rename webstillas/src/{modelData => Middleware}/addData.js (100%) rename webstillas/src/{modelData => Middleware}/deleteProject.js (96%) rename webstillas/src/{modelData => Middleware}/fetchData.js (95%) rename webstillas/src/{modelData => Middleware}/postModel.js (96%) rename webstillas/src/{modelData => Middleware}/putData.js (96%) rename webstillas/src/{components => Pages}/Login.js (92%) rename webstillas/src/{components => Pages}/Signup.js (94%) rename webstillas/src/{components/logistics/project/map.js => Pages/addProjectMap.js} (90%) rename webstillas/src/{components/logistics/scaffold => Pages}/addScaffolding.js (96%) rename webstillas/src/{components/mapPage => Pages}/mapPage.js (83%) rename webstillas/src/{components/projects => Pages}/projects.js (94%) rename webstillas/src/{components/scaffolding => Pages}/scaffolding.js (94%) rename webstillas/src/{components/userinformation => Pages}/userInfo.js (90%) rename webstillas/src/{ => Routes}/App.js (70%) rename webstillas/src/{components => Routes}/ProtectedRoute.js (89%) rename webstillas/src/components/{ => Indicators}/Spinner.js (91%) rename webstillas/src/components/{error => Indicators}/error.js (85%) rename webstillas/src/components/{logistics/project => addproject}/addProject.js (97%) delete mode 100644 webstillas/src/components/error/error.css delete mode 100644 webstillas/src/components/logistics/project/FormErrors.js rename webstillas/src/components/projects/{elements/card.js => mainProjectCard.js} (95%) rename webstillas/src/components/projects/{elements/preView.js => preViewSite.js} (91%) rename webstillas/src/components/{scaffolding/elements => projects}/scaffoldingCardProject.js (91%) rename webstillas/src/components/projects/{elements/Modal.js => transferScaffoldingModal.js} (97%) rename webstillas/src/components/scaffolding/{elements/ModalScaffolding.js => projectsModal.js} (94%) rename webstillas/src/components/scaffolding/{elements => }/scaffoldingCard.js (89%) diff --git a/webstillas/.gitignore b/webstillas/.gitignore index a2cdb7c..dac8e70 100644 --- a/webstillas/.gitignore +++ b/webstillas/.gitignore @@ -23,4 +23,4 @@ yarn-debug.log* yarn-error.log* -/src/firebaseConfig.js +/src/Config/firebaseConfig.js diff --git a/webstillas/src/components/mapPage/marker.png b/webstillas/src/Assets/Images/marker.png similarity index 100% rename from webstillas/src/components/mapPage/marker.png rename to webstillas/src/Assets/Images/marker.png diff --git a/webstillas/src/components/userinformation/profile-png-icon-2.png b/webstillas/src/Assets/Images/profile-png-icon-2.png similarity index 100% rename from webstillas/src/components/userinformation/profile-png-icon-2.png rename to webstillas/src/Assets/Images/profile-png-icon-2.png diff --git a/webstillas/src/components/scaffolding/images/Bunnskrue.jpg b/webstillas/src/Assets/Images/scaffoldingImages/Bunnskrue.jpg similarity index 100% rename from webstillas/src/components/scaffolding/images/Bunnskrue.jpg rename to webstillas/src/Assets/Images/scaffoldingImages/Bunnskrue.jpg diff --git a/webstillas/src/components/scaffolding/images/Diagonalstang.jpg b/webstillas/src/Assets/Images/scaffoldingImages/Diagonalstang.jpg similarity index 100% rename from webstillas/src/components/scaffolding/images/Diagonalstang.jpg rename to webstillas/src/Assets/Images/scaffoldingImages/Diagonalstang.jpg diff --git "a/webstillas/src/components/scaffolding/images/Enr\303\270rsbjelke.jpg" "b/webstillas/src/Assets/Images/scaffoldingImages/Enr\303\270rsbjelke.jpg" similarity index 100% rename from "webstillas/src/components/scaffolding/images/Enr\303\270rsbjelke.jpg" rename to "webstillas/src/Assets/Images/scaffoldingImages/Enr\303\270rsbjelke.jpg" diff --git a/webstillas/src/components/scaffolding/images/Gelender.jpg b/webstillas/src/Assets/Images/scaffoldingImages/Gelender.jpg similarity index 100% rename from webstillas/src/components/scaffolding/images/Gelender.jpg rename to webstillas/src/Assets/Images/scaffoldingImages/Gelender.jpg diff --git a/webstillas/src/components/scaffolding/images/Lengdebjelke.jpg b/webstillas/src/Assets/Images/scaffoldingImages/Lengdebjelke.jpg similarity index 100% rename from webstillas/src/components/scaffolding/images/Lengdebjelke.jpg rename to webstillas/src/Assets/Images/scaffoldingImages/Lengdebjelke.jpg diff --git a/webstillas/src/components/scaffolding/images/Plank.jpg b/webstillas/src/Assets/Images/scaffoldingImages/Plank.jpg similarity index 100% rename from webstillas/src/components/scaffolding/images/Plank.jpg rename to webstillas/src/Assets/Images/scaffoldingImages/Plank.jpg diff --git a/webstillas/src/components/scaffolding/images/Rekkverksramme.jpg b/webstillas/src/Assets/Images/scaffoldingImages/Rekkverksramme.jpg similarity index 100% rename from webstillas/src/components/scaffolding/images/Rekkverksramme.jpg rename to webstillas/src/Assets/Images/scaffoldingImages/Rekkverksramme.jpg diff --git a/webstillas/src/components/scaffolding/images/Spir.jpg b/webstillas/src/Assets/Images/scaffoldingImages/Spir.jpg similarity index 100% rename from webstillas/src/components/scaffolding/images/Spir.jpg rename to webstillas/src/Assets/Images/scaffoldingImages/Spir.jpg diff --git a/webstillas/src/components/scaffolding/images/Stillaslem.jpg b/webstillas/src/Assets/Images/scaffoldingImages/Stillaslem.jpg similarity index 100% rename from webstillas/src/components/scaffolding/images/Stillaslem.jpg rename to webstillas/src/Assets/Images/scaffoldingImages/Stillaslem.jpg diff --git a/webstillas/src/components/scaffolding/images/Trapp.jpg b/webstillas/src/Assets/Images/scaffoldingImages/Trapp.jpg similarity index 100% rename from webstillas/src/components/scaffolding/images/Trapp.jpg rename to webstillas/src/Assets/Images/scaffoldingImages/Trapp.jpg diff --git a/webstillas/src/components/projects/images/scaffoldingimg.jpg b/webstillas/src/Assets/Images/scaffoldingimg.jpg similarity index 100% rename from webstillas/src/components/projects/images/scaffoldingimg.jpg rename to webstillas/src/Assets/Images/scaffoldingimg.jpg diff --git a/webstillas/src/App.css b/webstillas/src/Assets/Styles/App.css similarity index 100% rename from webstillas/src/App.css rename to webstillas/src/Assets/Styles/App.css diff --git a/webstillas/src/components/projects/elements/Modal.css b/webstillas/src/Assets/Styles/Modal.css similarity index 99% rename from webstillas/src/components/projects/elements/Modal.css rename to webstillas/src/Assets/Styles/Modal.css index 9dc167d..5b694b3 100644 --- a/webstillas/src/components/projects/elements/Modal.css +++ b/webstillas/src/Assets/Styles/Modal.css @@ -28,7 +28,6 @@ } - .card{ width: 450px; margin-bottom: 20px; diff --git a/webstillas/src/components/scaffolding/elements/Modalscaffolding.css b/webstillas/src/Assets/Styles/Modalscaffolding.css similarity index 100% rename from webstillas/src/components/scaffolding/elements/Modalscaffolding.css rename to webstillas/src/Assets/Styles/Modalscaffolding.css diff --git a/webstillas/src/components/Spinner.css b/webstillas/src/Assets/Styles/Spinner.css similarity index 100% rename from webstillas/src/components/Spinner.css rename to webstillas/src/Assets/Styles/Spinner.css diff --git a/webstillas/src/components/logistics/project/addProject.css b/webstillas/src/Assets/Styles/addProject.css similarity index 100% rename from webstillas/src/components/logistics/project/addProject.css rename to webstillas/src/Assets/Styles/addProject.css diff --git a/webstillas/src/components/logistics/scaffold/addScaffolding.css b/webstillas/src/Assets/Styles/addScaffolding.css similarity index 100% rename from webstillas/src/components/logistics/scaffold/addScaffolding.css rename to webstillas/src/Assets/Styles/addScaffolding.css diff --git a/webstillas/src/components/projects/elements/card.css b/webstillas/src/Assets/Styles/card.css similarity index 100% rename from webstillas/src/components/projects/elements/card.css rename to webstillas/src/Assets/Styles/card.css diff --git a/webstillas/src/firebaselogin.css b/webstillas/src/Assets/Styles/firebaselogin.css similarity index 100% rename from webstillas/src/firebaselogin.css rename to webstillas/src/Assets/Styles/firebaselogin.css diff --git a/webstillas/src/components/logistics/project/map.css b/webstillas/src/Assets/Styles/map.css similarity index 100% rename from webstillas/src/components/logistics/project/map.css rename to webstillas/src/Assets/Styles/map.css diff --git a/webstillas/src/components/mapPage/mapPage.css b/webstillas/src/Assets/Styles/mapPage.css similarity index 100% rename from webstillas/src/components/mapPage/mapPage.css rename to webstillas/src/Assets/Styles/mapPage.css diff --git a/webstillas/src/components/projects/elements/preView.css b/webstillas/src/Assets/Styles/preView.css similarity index 100% rename from webstillas/src/components/projects/elements/preView.css rename to webstillas/src/Assets/Styles/preView.css diff --git a/webstillas/src/components/projects/projects.css b/webstillas/src/Assets/Styles/projects.css similarity index 100% rename from webstillas/src/components/projects/projects.css rename to webstillas/src/Assets/Styles/projects.css diff --git a/webstillas/src/components/scaffolding/scaffolding.css b/webstillas/src/Assets/Styles/scaffolding.css similarity index 100% rename from webstillas/src/components/scaffolding/scaffolding.css rename to webstillas/src/Assets/Styles/scaffolding.css diff --git a/webstillas/src/components/scaffolding/elements/scaffoldingCard.css b/webstillas/src/Assets/Styles/scaffoldingCard.css similarity index 100% rename from webstillas/src/components/scaffolding/elements/scaffoldingCard.css rename to webstillas/src/Assets/Styles/scaffoldingCard.css diff --git a/webstillas/src/components/topBar/topBar.css b/webstillas/src/Assets/Styles/topBar.css similarity index 75% rename from webstillas/src/components/topBar/topBar.css rename to webstillas/src/Assets/Styles/topBar.css index b0a685c..a04ea4e 100644 --- a/webstillas/src/components/topBar/topBar.css +++ b/webstillas/src/Assets/Styles/topBar.css @@ -6,9 +6,16 @@ .dropdown-toggle-topbar{ height: 70px; width: 150px; + border-style: none; + border-radius: 0; } + +.dropdown-toggle-topbar:hover .button{ + background-color:#d07506; ; +} + .button{ width: 150px; height: 70px; diff --git a/webstillas/src/components/userinformation/userInfo.css b/webstillas/src/Assets/Styles/userInfo.css similarity index 100% rename from webstillas/src/components/userinformation/userInfo.css rename to webstillas/src/Assets/Styles/userInfo.css diff --git a/webstillas/src/context/UserAuthContext.js b/webstillas/src/Config/UserAuthContext.js similarity index 97% rename from webstillas/src/context/UserAuthContext.js rename to webstillas/src/Config/UserAuthContext.js index f4e3fde..f5dc8fe 100644 --- a/webstillas/src/context/UserAuthContext.js +++ b/webstillas/src/Config/UserAuthContext.js @@ -5,12 +5,11 @@ import { onAuthStateChanged, signOut, } from "firebase/auth"; -import { auth } from "../firebase"; +import { auth } from "./firebase"; const userAuthContext = createContext(); //Hentet fra https://github.com/WebDevSimplified/React-Firebase-Auth - /** *Function that handles firebase log in and sign up. * diff --git a/webstillas/src/firebase.js b/webstillas/src/Config/firebase.js similarity index 100% rename from webstillas/src/firebase.js rename to webstillas/src/Config/firebase.js diff --git a/webstillas/src/modelData/constantsFile.js b/webstillas/src/Constants/apiURL.js similarity index 100% rename from webstillas/src/modelData/constantsFile.js rename to webstillas/src/Constants/apiURL.js diff --git a/webstillas/src/components/constants.js b/webstillas/src/Constants/webURL.js similarity index 100% rename from webstillas/src/components/constants.js rename to webstillas/src/Constants/webURL.js diff --git a/webstillas/src/components/projects/tabView/Tab.js b/webstillas/src/Layout/tabView/Tab.js similarity index 100% rename from webstillas/src/components/projects/tabView/Tab.js rename to webstillas/src/Layout/tabView/Tab.js diff --git a/webstillas/src/components/projects/tabView/Tabs.js b/webstillas/src/Layout/tabView/Tabs.js similarity index 100% rename from webstillas/src/components/projects/tabView/Tabs.js rename to webstillas/src/Layout/tabView/Tabs.js diff --git a/webstillas/src/components/topBar/topBar.js b/webstillas/src/Layout/topBar/topBar.js similarity index 89% rename from webstillas/src/components/topBar/topBar.js rename to webstillas/src/Layout/topBar/topBar.js index 1fd3447..3213af4 100644 --- a/webstillas/src/components/topBar/topBar.js +++ b/webstillas/src/Layout/topBar/topBar.js @@ -1,21 +1,21 @@ import React from "react"; -import './topBar.css'; +import '../../Assets/Styles/topBar.css'; import { AppBar, Toolbar, Button } from '@material-ui/core'; import {Link} from "react-router-dom"; import {Dropdown } from "react-bootstrap"; import DropdownItem from "react-bootstrap/DropdownItem"; -import {useUserAuth} from "../../context/UserAuthContext"; -import {auth} from "../../firebase" -import {GetCachingData} from "../../modelData/addData"; -import {USER_URL} from "../../modelData/constantsFile"; -import {SpinnerDefault} from "../Spinner"; +import {useUserAuth} from "../../Config/UserAuthContext"; +import {auth} from "../../Config/firebase" +import {GetCachingData} from "../../Middleware/addData"; +import {USER_URL} from "../../Constants/apiURL"; +import {SpinnerDefault} from "../../components/Indicators/Spinner"; import "bootstrap/dist/css/bootstrap.min.css"; -import {ADD_PROJECT_URL, ADD_SCAFFOLDING_URL, MAP_URL, PROJECT_URL, SCAFFOLDING_URL, USERINFO_URL} from "../constants"; +import {ADD_PROJECT_URL, ADD_SCAFFOLDING_URL, MAP_URL, PROJECT_URL, SCAFFOLDING_URL, USERINFO_URL} from "../../Constants/webURL"; import DropdownToggle from "react-bootstrap/DropdownToggle"; import DropdownMenu from "react-bootstrap/DropdownMenu"; -import profileImg from "../userinformation/profile-png-icon-2.png" +import profileImg from "../../Assets/Images/profile-png-icon-2.png" /** Component that will be used as a top bar for the user to navigate throughout the application. diff --git a/webstillas/src/modelData/addData.js b/webstillas/src/Middleware/addData.js similarity index 100% rename from webstillas/src/modelData/addData.js rename to webstillas/src/Middleware/addData.js diff --git a/webstillas/src/modelData/deleteProject.js b/webstillas/src/Middleware/deleteProject.js similarity index 96% rename from webstillas/src/modelData/deleteProject.js rename to webstillas/src/Middleware/deleteProject.js index f461563..20fc257 100644 --- a/webstillas/src/modelData/deleteProject.js +++ b/webstillas/src/Middleware/deleteProject.js @@ -1,4 +1,4 @@ -import {BASE_URL} from "./constantsFile" +import {BASE_URL} from "../Constants/apiURL" /** * Function that will send a delete request to an api. diff --git a/webstillas/src/modelData/fetchData.js b/webstillas/src/Middleware/fetchData.js similarity index 95% rename from webstillas/src/modelData/fetchData.js rename to webstillas/src/Middleware/fetchData.js index 76e2709..d370a31 100644 --- a/webstillas/src/modelData/fetchData.js +++ b/webstillas/src/Middleware/fetchData.js @@ -1,4 +1,4 @@ -import {BASE_URL} from "./constantsFile" +import {BASE_URL} from "../Constants/apiURL" /** * Function to fetch data from an api diff --git a/webstillas/src/modelData/postModel.js b/webstillas/src/Middleware/postModel.js similarity index 96% rename from webstillas/src/modelData/postModel.js rename to webstillas/src/Middleware/postModel.js index 4089f85..442ca96 100644 --- a/webstillas/src/modelData/postModel.js +++ b/webstillas/src/Middleware/postModel.js @@ -1,4 +1,4 @@ -import {BASE_URL} from "./constantsFile"; +import {BASE_URL} from "../Constants/apiURL"; /** * Function to post data to an api diff --git a/webstillas/src/modelData/putData.js b/webstillas/src/Middleware/putData.js similarity index 96% rename from webstillas/src/modelData/putData.js rename to webstillas/src/Middleware/putData.js index 2b9f3b6..53f87b7 100644 --- a/webstillas/src/modelData/putData.js +++ b/webstillas/src/Middleware/putData.js @@ -1,4 +1,4 @@ -import {BASE_URL} from "./constantsFile"; +import {BASE_URL} from "../Constants/apiURL"; /** diff --git a/webstillas/src/components/Login.js b/webstillas/src/Pages/Login.js similarity index 92% rename from webstillas/src/components/Login.js rename to webstillas/src/Pages/Login.js index 9ee607a..d773da8 100644 --- a/webstillas/src/components/Login.js +++ b/webstillas/src/Pages/Login.js @@ -2,9 +2,9 @@ import React, { useState } from "react"; import { Link, useNavigate } from "react-router-dom"; import { Form, Alert } from "react-bootstrap"; import { Button } from "react-bootstrap"; -import { useUserAuth } from "../context/UserAuthContext"; -import {PROJECT_URL, SIGNUP} from "./constants"; -import "../firebaselogin.css" +import { useUserAuth } from "../Config/UserAuthContext"; +import {PROJECT_URL, SIGNUP} from "../Constants/webURL"; +import "../Assets/Styles/firebaselogin.css" /** diff --git a/webstillas/src/components/Signup.js b/webstillas/src/Pages/Signup.js similarity index 94% rename from webstillas/src/components/Signup.js rename to webstillas/src/Pages/Signup.js index 82c52a4..8ac8123 100644 --- a/webstillas/src/components/Signup.js +++ b/webstillas/src/Pages/Signup.js @@ -2,12 +2,12 @@ import React, {useState} from "react"; import {Link, useNavigate} from "react-router-dom"; import {Form, Alert} from "react-bootstrap"; import {Button} from "react-bootstrap"; -import {useUserAuth} from "../context/UserAuthContext"; -import postModel from "../modelData/postModel"; -import {formatDateToString} from "./projects/projects"; -import {LOGIN} from "./constants"; -import {USER_POST_URL} from "../modelData/constantsFile"; -import "../firebaselogin.css" +import {useUserAuth} from "../Config/UserAuthContext"; +import postModel from "../Middleware/postModel"; +import {formatDateToString} from "./projects"; +import {LOGIN} from "../Constants/webURL"; +import {USER_POST_URL} from "../Constants/apiURL"; +import "../Assets/Styles/firebaselogin.css" /** * Function that will register a new user to the system. diff --git a/webstillas/src/components/logistics/project/map.js b/webstillas/src/Pages/addProjectMap.js similarity index 90% rename from webstillas/src/components/logistics/project/map.js rename to webstillas/src/Pages/addProjectMap.js index 65f9895..00b7d41 100644 --- a/webstillas/src/components/logistics/project/map.js +++ b/webstillas/src/Pages/addProjectMap.js @@ -2,15 +2,15 @@ import React, {useState} from "react"; import ReactMapboxGl, {ZoomControl} from "react-mapbox-gl"; import DrawControl from "react-mapbox-gl-draw"; import "@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css"; -import postModel from "../../../modelData/postModel"; -import {MAP_STYLE_V11, PROJECTS_URL} from "../../../modelData/constantsFile"; +import postModel from "../Middleware/postModel"; +import {MAP_STYLE_V11, PROJECTS_URL} from "../Constants/apiURL"; import {useQueryClient} from "react-query"; import polygon from "@mapbox/mapbox-gl-draw/src/feature_types/polygon"; -import "./map.css" -import {MapBoxAPIKey} from "../../../firebaseConfig"; -import {AlertCatch} from "../../error/error"; +import "../Assets/Styles/map.css" +import {MapBoxAPIKey} from "../Config/firebaseConfig"; +import {AlertCatch} from "../components/Indicators/error"; -const Map = ReactMapboxGl({ +const AddProjectMap = ReactMapboxGl({ accessToken: MapBoxAPIKey }); @@ -18,7 +18,7 @@ const Map = ReactMapboxGl({ * Function that will display a map, and allow a user to draw a polygon. * * @param props variables sent from previous view. - * @returns {JSX.Element} Map with draw controllers. + * @returns {JSX.Element} AddProjectMap with draw controllers. */ export function MapClass(props) { //Query client that will manage the caching. @@ -95,7 +95,7 @@ export function MapClass(props) { return ( <div className="App"> <div className={"map"}> - <Map + <AddProjectMap style={MAP_STYLE_V11} containerStyle={{ height: "80vh", @@ -120,7 +120,7 @@ export function MapClass(props) { <ZoomControl position="bottom-right" /> - </Map> + </AddProjectMap> </div> <button className={"confirm-btn"} disabled={!ok || !props.valid} onClick={AddProjectRequest}>Add Project</button> </div> diff --git a/webstillas/src/components/logistics/scaffold/addScaffolding.js b/webstillas/src/Pages/addScaffolding.js similarity index 96% rename from webstillas/src/components/logistics/scaffold/addScaffolding.js rename to webstillas/src/Pages/addScaffolding.js index 3fc4f8f..89a6e94 100644 --- a/webstillas/src/components/logistics/scaffold/addScaffolding.js +++ b/webstillas/src/Pages/addScaffolding.js @@ -1,7 +1,7 @@ import React, {useState} from 'react' -import postModel from "../../../modelData/postModel"; -import {SCAFFOLDING_URL} from "../../../modelData/constantsFile"; -import "./addScaffolding.css" +import postModel from "../Middleware/postModel"; +import {SCAFFOLDING_URL} from "../Constants/apiURL"; +import "../Assets/Styles/addScaffolding.css" import {Alert} from "react-bootstrap"; diff --git a/webstillas/src/components/mapPage/mapPage.js b/webstillas/src/Pages/mapPage.js similarity index 83% rename from webstillas/src/components/mapPage/mapPage.js rename to webstillas/src/Pages/mapPage.js index 6039ff4..2a8e2d7 100644 --- a/webstillas/src/components/mapPage/mapPage.js +++ b/webstillas/src/Pages/mapPage.js @@ -1,12 +1,12 @@ import React from "react"; -import "./mapPage.css" -import {MAP_STYLE_V11, PROJECTS_WITH_SCAFFOLDING_URL} from "../../modelData/constantsFile"; -import {GetCachingData} from "../../modelData/addData"; +import "../Assets/Styles/mapPage.css" +import {MAP_STYLE_V11, PROJECTS_WITH_SCAFFOLDING_URL} from "../Constants/apiURL"; +import {GetCachingData} from "../Middleware/addData"; import ReactMapboxGl, {ScaleControl, Marker, ZoomControl} from "react-mapbox-gl"; -import {MapBoxAPIKey} from "../../firebaseConfig"; -import img from "./marker.png" -import {InternalServerError} from "../error/error"; -import {SpinnerDefault} from "../Spinner"; +import {MapBoxAPIKey} from "../Config/firebaseConfig"; +import img from "../Assets/Images/marker.png" +import {InternalServerError} from "../components/Indicators/error"; +import {SpinnerDefault} from "../components/Indicators/Spinner"; const Map = ReactMapboxGl({ accessToken: MapBoxAPIKey diff --git a/webstillas/src/components/projects/projects.js b/webstillas/src/Pages/projects.js similarity index 94% rename from webstillas/src/components/projects/projects.js rename to webstillas/src/Pages/projects.js index 577e53c..ef9f8ca 100644 --- a/webstillas/src/components/projects/projects.js +++ b/webstillas/src/Pages/projects.js @@ -1,11 +1,11 @@ import React, {useState} from "react"; -import "./projects.css" -import CardElement from './elements/card' +import "../Assets/Styles/projects.css" +import CardElement from '../components/projects/mainProjectCard' import {Route, Routes} from "react-router-dom"; -import {PROJECTS_WITH_SCAFFOLDING_URL} from "../../modelData/constantsFile"; -import {GetCachingData} from "../../modelData/addData"; -import {SpinnerDefault} from "../Spinner"; -import {InternalServerError} from "../error/error"; +import {PROJECTS_WITH_SCAFFOLDING_URL} from "../Constants/apiURL"; +import {GetCachingData} from "../Middleware/addData"; +import {SpinnerDefault} from "../components/Indicators/Spinner"; +import {InternalServerError} from "../components/Indicators/error"; /** @@ -30,7 +30,7 @@ export function Project() { return ( <SpinnerDefault/> ) - } else if (isError) //If an error while fetching data has occurred + } else if (isError) //If an Indicators while fetching data has occurred { return <InternalServerError/> } else { diff --git a/webstillas/src/components/scaffolding/scaffolding.js b/webstillas/src/Pages/scaffolding.js similarity index 94% rename from webstillas/src/components/scaffolding/scaffolding.js rename to webstillas/src/Pages/scaffolding.js index 8b9750b..b16ef2a 100644 --- a/webstillas/src/components/scaffolding/scaffolding.js +++ b/webstillas/src/Pages/scaffolding.js @@ -1,10 +1,10 @@ import React from "react"; -import "./scaffolding.css" -import CardElement from "./elements/scaffoldingCard"; -import {PROJECTS_WITH_SCAFFOLDING_URL, SCAFFOLDING_URL, STORAGE_URL} from "../../modelData/constantsFile"; -import {GetCachingData} from "../../modelData/addData"; -import {SpinnerDefault} from "../Spinner"; -import {InternalServerError} from "../error/error"; +import "../Assets/Styles/scaffolding.css" +import CardElement from "../components/scaffolding/scaffoldingCard"; +import {PROJECTS_WITH_SCAFFOLDING_URL, SCAFFOLDING_URL, STORAGE_URL} from "../Constants/apiURL"; +import {GetCachingData} from "../Middleware/addData"; +import {SpinnerDefault} from "../components/Indicators/Spinner"; +import {InternalServerError} from "../components/Indicators/error"; /** Class that will create an overview of the scaffolding parts @@ -152,7 +152,7 @@ export const Scaffolding = () => { //If loading if (LoadingScaffolding || LoadingStorage || LoadingAll) { return <SpinnerDefault /> - } else if(scaffoldingError || storageError || allProjectError) //If loading error + } else if(scaffoldingError || storageError || allProjectError) //If loading Indicators { return <InternalServerError /> } else { //On success diff --git a/webstillas/src/components/userinformation/userInfo.js b/webstillas/src/Pages/userInfo.js similarity index 90% rename from webstillas/src/components/userinformation/userInfo.js rename to webstillas/src/Pages/userInfo.js index 38b2344..4b9588d 100644 --- a/webstillas/src/components/userinformation/userInfo.js +++ b/webstillas/src/Pages/userInfo.js @@ -1,11 +1,11 @@ import React from "react"; -import { auth } from "../../firebase"; -import {GetCachingData} from "../../modelData/addData"; -import { USER_URL} from "../../modelData/constantsFile"; -import {SpinnerDefault} from "../Spinner"; -import "./userInfo.css" -import profileImg from "./profile-png-icon-2.png" -import {InternalServerError} from "../error/error"; +import { auth } from "../Config/firebase"; +import {GetCachingData} from "../Middleware/addData"; +import { USER_URL} from "../Constants/apiURL"; +import {SpinnerDefault} from "../components/Indicators/Spinner"; +import "../Assets/Styles/userInfo.css" +import profileImg from "../Assets/Images/profile-png-icon-2.png" +import {InternalServerError} from "../components/Indicators/error"; /** @@ -14,8 +14,6 @@ import {InternalServerError} from "../error/error"; * @constructor */ export function UserInfo(){ - //Todo add if error - let isLoadingUser, userData, isErrorUser //If user is authenticated load user data diff --git a/webstillas/src/App.js b/webstillas/src/Routes/App.js similarity index 70% rename from webstillas/src/App.js rename to webstillas/src/Routes/App.js index 5739acd..567b8ec 100644 --- a/webstillas/src/App.js +++ b/webstillas/src/Routes/App.js @@ -1,28 +1,28 @@ -import './App.css'; +import '../Assets/Styles/App.css'; import React from "react"; import {Routes, Route} from "react-router-dom"; -import {Project} from "./components/projects/projects"; -import {MapPage} from "./components/mapPage/mapPage"; -import {Scaffolding} from "./components/scaffolding/scaffolding"; -import TopBar from "./components/topBar/topBar"; -import {PreView} from "./components/projects/elements/preView"; +import {Project} from "../Pages/projects"; +import {MapPage} from "../Pages/mapPage"; +import {Scaffolding} from "../Pages/scaffolding"; +import TopBar from "../Layout/topBar/topBar"; +import {PreViewSite} from "../components/projects/preViewSite"; import {QueryClientProvider, QueryClient} from 'react-query' import {ReactQueryDevtools} from 'react-query/devtools' -import ProtectedRoute from "./components/ProtectedRoute"; -import Login from "./components/Login"; -import Signup from "./components/Signup"; -import {UserAuthContextProvider} from "./context/UserAuthContext"; -import AddProjectFunc from "./components/logistics/project/addProject"; -import AddScaffolding from "./components/logistics/scaffold/addScaffolding"; -import {UserInfo} from "./components/userinformation/userInfo"; -import {NotFound} from "./components/error/error"; +import ProtectedRoute from "./ProtectedRoute"; +import Login from "../Pages/Login"; +import Signup from "../Pages/Signup"; +import {UserAuthContextProvider} from "../Config/UserAuthContext"; +import AddProjectFunc from "../components/addproject/addProject"; +import AddScaffolding from "../Pages/addScaffolding"; +import {UserInfo} from "../Pages/userInfo"; +import {NotFound} from "../components/Indicators/error"; import { ADD_PROJECT_URL, ADD_SCAFFOLDING_URL, LOGIN, MAP_URL, NOTFOUND, PROJECT_URL, PROJECT_URL_ID, SCAFFOLDING_URL, SIGNUP, USERINFO_URL -} from "./components/constants"; +} from "../Constants/webURL"; const queryClient = new QueryClient() @@ -44,7 +44,7 @@ function App() { <Route path={PROJECT_URL} exact={true} element={<ProtectedRoute> <Project/></ProtectedRoute>}/> <Route path={MAP_URL} exact={true} element={<ProtectedRoute> <MapPage/></ProtectedRoute>}/> <Route path={SCAFFOLDING_URL} exact={true} element={<ProtectedRoute> <Scaffolding/></ProtectedRoute>}/> - <Route path={PROJECT_URL_ID} exact={true} element={<ProtectedRoute> <PreView/></ProtectedRoute>}/> + <Route path={PROJECT_URL_ID} exact={true} element={<ProtectedRoute> <PreViewSite/></ProtectedRoute>}/> <Route path={LOGIN} exact={true} element={<Login/>}/> <Route path={SIGNUP} exact={true} element={<Signup/>}/> <Route path={ADD_PROJECT_URL} exact={true} diff --git a/webstillas/src/components/ProtectedRoute.js b/webstillas/src/Routes/ProtectedRoute.js similarity index 89% rename from webstillas/src/components/ProtectedRoute.js rename to webstillas/src/Routes/ProtectedRoute.js index 48fb7ca..fec81fa 100644 --- a/webstillas/src/components/ProtectedRoute.js +++ b/webstillas/src/Routes/ProtectedRoute.js @@ -1,6 +1,6 @@ import React from "react"; import { Navigate } from "react-router-dom"; -import { useUserAuth } from "../context/UserAuthContext"; +import { useUserAuth } from "../Config/UserAuthContext"; /** * Function that will check if the user is authenticated, before sending the user to a protected route diff --git a/webstillas/src/components/Spinner.js b/webstillas/src/components/Indicators/Spinner.js similarity index 91% rename from webstillas/src/components/Spinner.js rename to webstillas/src/components/Indicators/Spinner.js index 00c67e4..9ce4cca 100644 --- a/webstillas/src/components/Spinner.js +++ b/webstillas/src/components/Indicators/Spinner.js @@ -1,6 +1,6 @@ import {Spinner} from "react-bootstrap"; import React from "react"; -import "./Spinner.css" +import "../../Assets/Styles/Spinner.css" /** * Function that will return a spinner diff --git a/webstillas/src/components/error/error.js b/webstillas/src/components/Indicators/error.js similarity index 85% rename from webstillas/src/components/error/error.js rename to webstillas/src/components/Indicators/error.js index 47568b0..da95832 100644 --- a/webstillas/src/components/error/error.js +++ b/webstillas/src/components/Indicators/error.js @@ -10,7 +10,7 @@ export function NotFound() { } /* -Error function that will be displayed if a server error occurs. +Error function that will be displayed if a server Indicators occurs. */ export function InternalServerError() { return ( diff --git a/webstillas/src/components/logistics/project/addProject.js b/webstillas/src/components/addproject/addProject.js similarity index 97% rename from webstillas/src/components/logistics/project/addProject.js rename to webstillas/src/components/addproject/addProject.js index 4c70678..6a1f342 100644 --- a/webstillas/src/components/logistics/project/addProject.js +++ b/webstillas/src/components/addproject/addProject.js @@ -1,10 +1,10 @@ -import React, {useCallback, useRef, useState} from 'react' -import {MapClass} from "./map"; +import React, {useState} from 'react' +import {MapClass} from "../../Pages/addProjectMap"; import MapboxAutocomplete from "react-mapbox-autocomplete"; import 'mapbox-gl/dist/mapbox-gl.css' -import "./addProject.css" +import "../../Assets/Styles/addProject.css" import {Alert} from "react-bootstrap"; -import {MapBoxAPIKey} from "../../../firebaseConfig"; +import {MapBoxAPIKey} from "../../Config/firebaseConfig"; /** @@ -109,7 +109,7 @@ export default function AddProjectFunc() { /** * Function that will validate the customer input - * If input is not valid, then a predefined error message is set. + * If input is not valid, then a predefined Indicators message is set. * * @param fieldName is the object field that is going to be set * @param value is the object value to be set. @@ -139,7 +139,7 @@ export default function AddProjectFunc() { /** * Function to validate date format. - * If input is not valid, then a predefined error message is set. + * If input is not valid, then a predefined Indicators message is set. * * @param fieldName is the object field that is going to be set * @param value is the object value to be set. @@ -161,7 +161,7 @@ export default function AddProjectFunc() { /** * Function to validate projectDetails - * If input is not valid, then a predefined error message is set. + * If input is not valid, then a predefined Indicators message is set. * * @param fieldName is the object field that is going to be set * @param value is the object value to be set. @@ -263,7 +263,6 @@ export default function AddProjectFunc() { } - if (validStreet && validZip && validCounty && validMunicipality) { setValid({ ...valid, diff --git a/webstillas/src/components/error/error.css b/webstillas/src/components/error/error.css deleted file mode 100644 index e69de29..0000000 diff --git a/webstillas/src/components/logistics/project/FormErrors.js b/webstillas/src/components/logistics/project/FormErrors.js deleted file mode 100644 index cfe04b5..0000000 --- a/webstillas/src/components/logistics/project/FormErrors.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; - -export const FormErrors = ({formErrors}) => - <div className='formErrors'> - {Object.keys(formErrors).map((fieldName, i) => { - if(formErrors[fieldName].length > 0){ - return ( - <p key={i}>{fieldName} {formErrors[fieldName]}</p> - ) - } else { - return ''; - } - })} - </div> diff --git a/webstillas/src/components/projects/elements/card.js b/webstillas/src/components/projects/mainProjectCard.js similarity index 95% rename from webstillas/src/components/projects/elements/card.js rename to webstillas/src/components/projects/mainProjectCard.js index d29eb3e..2e642f0 100644 --- a/webstillas/src/components/projects/elements/card.js +++ b/webstillas/src/components/projects/mainProjectCard.js @@ -1,10 +1,10 @@ import React from 'react' import 'bootstrap/dist/css/bootstrap.min.css'; -import './card.css' -import img from '../images/scaffoldingimg.jpg' +import '../../Assets/Styles/card.css' +import img from '../../Assets/Images/scaffoldingimg.jpg' import {Link} from "react-router-dom"; -import {PROJECTS_URL} from "../../../modelData/constantsFile"; -import deleteModel from "../../../modelData/deleteProject"; +import {PROJECTS_URL} from "../../Constants/apiURL"; +import deleteModel from "../../Middleware/deleteProject"; import {useQueryClient} from "react-query"; import {IconButton} from "@material-ui/core"; import DeleteIcon from "@material-ui/icons/Delete"; diff --git a/webstillas/src/components/projects/elements/preView.js b/webstillas/src/components/projects/preViewSite.js similarity index 91% rename from webstillas/src/components/projects/elements/preView.js rename to webstillas/src/components/projects/preViewSite.js index 84626f7..0ff0e7b 100644 --- a/webstillas/src/components/projects/elements/preView.js +++ b/webstillas/src/components/projects/preViewSite.js @@ -1,19 +1,19 @@ import React from "react"; -import "./preView.css" -import Tabs from "../tabView/Tabs" -import ScaffoldingCardProject from "../../scaffolding/elements/scaffoldingCardProject"; -import InfoModal from "./Modal"; +import "../../Assets/Styles/preView.css" +import Tabs from "../../Layout/tabView/Tabs" +import ScaffoldingCardProject from "../../components/projects/scaffoldingCardProject"; +import InfoModal from "./transferScaffoldingModal"; import { MAP_STYLE_V11, PROJECTS_URL_WITH_ID, WITH_SCAFFOLDING_URL -} from "../../../modelData/constantsFile"; -import img from "./../../mapPage/marker.png" -import {GetCachingData} from "../../../modelData/addData"; -import {SpinnerDefault} from "../../Spinner"; +} from "../../Constants/apiURL"; +import img from "../../Assets/Images/marker.png" +import {GetCachingData} from "../../Middleware/addData"; +import {SpinnerDefault} from "../Indicators/Spinner"; import ReactMapboxGl, {Marker} from "react-mapbox-gl"; -import {MapBoxAPIKey} from "../../../firebaseConfig"; -import {InternalServerError} from "../../error/error"; +import {MapBoxAPIKey} from "../../Config/firebaseConfig"; +import {InternalServerError} from "../Indicators/error"; const Map = ReactMapboxGl({ @@ -154,7 +154,7 @@ function contactInformation(project) { * Function that displays the whole page. * @returns {JSX.Element} */ -export const PreView = () => { +export const PreViewSite = () => { //Fetching the data of specific project. const {isLoading: projectLoad, data, isError } = GetCachingData(["project", getProjectID()], PROJECTS_URL_WITH_ID + getProjectID() + WITH_SCAFFOLDING_URL) diff --git a/webstillas/src/components/scaffolding/elements/scaffoldingCardProject.js b/webstillas/src/components/projects/scaffoldingCardProject.js similarity index 91% rename from webstillas/src/components/scaffolding/elements/scaffoldingCardProject.js rename to webstillas/src/components/projects/scaffoldingCardProject.js index d0c68fc..676018e 100644 --- a/webstillas/src/components/scaffolding/elements/scaffoldingCardProject.js +++ b/webstillas/src/components/projects/scaffoldingCardProject.js @@ -15,7 +15,7 @@ function ScaffoldingProject(props){ <h3>{props.type.toUpperCase()}</h3> </section> <section className={"image"}> - <img className={"img"} src={require(`../images/${props.type.charAt(0).toUpperCase() + props.type.slice(1)}.jpg`)} alt={""}></img> + <img className={"img"} src={require(`../../Assets/Images/scaffoldingImages/${props.type.charAt(0).toUpperCase() + props.type.slice(1)}.jpg`)} alt={""}></img> </section> <section className={"information-highlights-cta"}> <div className={"information-highlights"}> diff --git a/webstillas/src/components/projects/elements/Modal.js b/webstillas/src/components/projects/transferScaffoldingModal.js similarity index 97% rename from webstillas/src/components/projects/elements/Modal.js rename to webstillas/src/components/projects/transferScaffoldingModal.js index 448cb1e..bbd54c2 100644 --- a/webstillas/src/components/projects/elements/Modal.js +++ b/webstillas/src/components/projects/transferScaffoldingModal.js @@ -1,16 +1,14 @@ import React, {useState} from "react"; import 'bootstrap/dist/css/bootstrap.min.css'; import {Button, Modal, Spinner} from 'react-bootstrap'; -import putModel from "../../../modelData/putData"; +import putModel from "../../Middleware/putData"; import { PROJECTS_WITH_SCAFFOLDING_URL, TRANSFER_SCAFFOLDING, -} from "../../../modelData/constantsFile"; +} from "../../Constants/apiURL"; import {useQueryClient} from "react-query"; -import "./Modal.css" -import {GetCachingData} from "../../../modelData/addData"; - - +import "../../Assets/Styles/Modal.css" +import {GetCachingData} from "../../Middleware/addData"; //https://ordinarycoders.com/blog/article/react-bootstrap-modal @@ -204,7 +202,7 @@ export default function InfoModalFunc(props) { </section> <section className={"image"}> <img className={"img"} - src={require(`../../scaffolding/images/${e.type.charAt(0).toUpperCase() + e.type.slice(1)}.jpg`)} + src={require(`../../Assets/Images/scaffoldingImages/${e.type.charAt(0).toUpperCase() + e.type.slice(1)}.jpg`)} alt={""}></img> </section> <input diff --git a/webstillas/src/components/scaffolding/elements/ModalScaffolding.js b/webstillas/src/components/scaffolding/projectsModal.js similarity index 94% rename from webstillas/src/components/scaffolding/elements/ModalScaffolding.js rename to webstillas/src/components/scaffolding/projectsModal.js index 26cc744..9d5a2a9 100644 --- a/webstillas/src/components/scaffolding/elements/ModalScaffolding.js +++ b/webstillas/src/components/scaffolding/projectsModal.js @@ -1,10 +1,10 @@ import React, {useState} from "react"; import {Button, Modal} from "react-bootstrap"; import {Link} from "react-router-dom"; -import {GetCachingData} from "../../../modelData/addData"; -import {PROJECTS_WITH_SCAFFOLDING_URL} from "../../../modelData/constantsFile"; -import "./Modalscaffolding.css" -import img from "../../projects/images/scaffoldingimg.jpg" +import {GetCachingData} from "../../Middleware/addData"; +import {PROJECTS_WITH_SCAFFOLDING_URL} from "../../Constants/apiURL"; +import "../../Assets/Styles/Modalscaffolding.css" +import img from "../../Assets/Images/scaffoldingimg.jpg" /** diff --git a/webstillas/src/components/scaffolding/elements/scaffoldingCard.js b/webstillas/src/components/scaffolding/scaffoldingCard.js similarity index 89% rename from webstillas/src/components/scaffolding/elements/scaffoldingCard.js rename to webstillas/src/components/scaffolding/scaffoldingCard.js index 5781c30..95b06f7 100644 --- a/webstillas/src/components/scaffolding/elements/scaffoldingCard.js +++ b/webstillas/src/components/scaffolding/scaffoldingCard.js @@ -1,6 +1,6 @@ import React from 'react' -import './scaffoldingCard.css' -import InfoModal from "./ModalScaffolding"; +import '../../Assets/Styles/scaffoldingCard.css' +import InfoModal from "./projectsModal"; /** @@ -20,7 +20,7 @@ function CardElement(props){ <h3>{props.type.toUpperCase()}</h3> </section> <section className={"image"}> - <img className={"img"} src={require(`../images/${props.type.charAt(0).toUpperCase() + props.type.slice(1)}.jpg`)} alt={""}></img> + <img className={"img"} src={require(`../../Assets/Images/scaffoldingImages/${props.type.charAt(0).toUpperCase() + props.type.slice(1)}.jpg`)} alt={""}></img> </section> <section className={"information-highlights-cta"}> <div className={"information-highlights"}> diff --git a/webstillas/src/index.js b/webstillas/src/index.js index cce6a52..f724eb9 100644 --- a/webstillas/src/index.js +++ b/webstillas/src/index.js @@ -1,6 +1,6 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import App from './App'; +import App from './Routes/App'; import {BrowserRouter} from "react-router-dom"; ReactDOM.render( -- GitLab