From 3011257e6f2310873fb8c151a6a2f67e842c97c8 Mon Sep 17 00:00:00 2001 From: Jim Barnes Date: Thu, 27 Jun 2024 09:35:59 -0400 Subject: [PATCH 01/10] Added rewrite for the map directory --- staticwebapp.config.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/staticwebapp.config.json b/staticwebapp.config.json index 7cb161d..1c371c4 100644 --- a/staticwebapp.config.json +++ b/staticwebapp.config.json @@ -1,5 +1,11 @@ { "platform": { "apiRuntime": "node:18" - } + }, + "routes": [ + { + "route": "/map*", + "rewrite": "/" + } + ] } From ec5c54d4e99a932561f8c460d4a33c34b81d2b34 Mon Sep 17 00:00:00 2001 From: Jim Barnes Date: Thu, 27 Jun 2024 09:43:19 -0400 Subject: [PATCH 02/10] Reverting route changes --- staticwebapp.config.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/staticwebapp.config.json b/staticwebapp.config.json index 1c371c4..7cb161d 100644 --- a/staticwebapp.config.json +++ b/staticwebapp.config.json @@ -1,11 +1,5 @@ { "platform": { "apiRuntime": "node:18" - }, - "routes": [ - { - "route": "/map*", - "rewrite": "/" - } - ] + } } From 1058fd77447fa631c20ddf11ea67c89a1e30c7d1 Mon Sep 17 00:00:00 2001 From: Jim Barnes Date: Thu, 27 Jun 2024 13:24:01 -0400 Subject: [PATCH 03/10] Testing a base url concept --- index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html b/index.html index 2cd7bb0..a2ac9e8 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,7 @@ Vite + React + TS +
From ec534a986da87cc36f431f7ad2948dfddd67ed44 Mon Sep 17 00:00:00 2001 From: Jim Barnes Date: Thu, 27 Jun 2024 13:26:28 -0400 Subject: [PATCH 04/10] Trying another thing --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index a2ac9e8..296d829 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Vite + React + TS - +
From 57571f28b722a38886c1aaaf974df2621801de16 Mon Sep 17 00:00:00 2001 From: Jim Barnes Date: Thu, 27 Jun 2024 13:44:45 -0400 Subject: [PATCH 05/10] Updated application to take advantage of the react router --- .env.template | 2 +- ...tic-web-apps-delightful-moss-0832eaa0f.yml | 1 + index.html | 1 - package-lock.json | 39 +++++++++++++++++++ package.json | 1 + src/main.tsx | 14 ++++++- src/vite-env.d.ts | 1 + 7 files changed, 56 insertions(+), 3 deletions(-) diff --git a/.env.template b/.env.template index 785b956..fceb7d3 100644 --- a/.env.template +++ b/.env.template @@ -4,4 +4,4 @@ VITE_REMOTE_HEADER_MENU_ID=23 VITE_REMOTE_FOOTER_MENU_ID=24 VITE_REMOTE_SOCIAL_LINKS_ID=26 VITE_LOCATION_API_URL=https://www.ucf.edu/wp-json/wp/v2/locations/ - +VITE_BASEURL=/ diff --git a/.github/workflows/azure-static-web-apps-delightful-moss-0832eaa0f.yml b/.github/workflows/azure-static-web-apps-delightful-moss-0832eaa0f.yml index 4ef4e06..d95b916 100644 --- a/.github/workflows/azure-static-web-apps-delightful-moss-0832eaa0f.yml +++ b/.github/workflows/azure-static-web-apps-delightful-moss-0832eaa0f.yml @@ -21,6 +21,7 @@ jobs: VITE_REMOTE_FOOTER_MENU_ID: ${{ vars.VITE_REMOTE_FOOTER_MENU_ID }} VITE_REMOTE_SOCIAL_LINKS_ID: ${{ vars.VITE_REMOTE_SOCIAL_LINKS_ID }} VITE_LOCATION_API_URL: ${{ vars.VITE_LOCATION_API_URL_DEV }} + VITE_BASEURL: ${{ vars.VITE_BASEURL_DEV }} name: Build and Deploy Job steps: - uses: actions/checkout@v3 diff --git a/index.html b/index.html index 296d829..2cd7bb0 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,6 @@ Vite + React + TS -
diff --git a/package-lock.json b/package-lock.json index 2dc1d8d..e09e9b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-map-gl": "^7.1.7", + "react-router-dom": "^6.24.0", "sass": "^1.76.0" }, "devDependencies": { @@ -1077,6 +1078,14 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/@remix-run/router": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.17.0.tgz", + "integrity": "sha512-2D6XaHEVvkCn682XBnipbJjgZUU7xjLtA4dGJRBVUKpEaDYOZMENZoZjAOSb7qirxt5RupjzZxz4fK2FO+EFPw==", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.17.2", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.17.2.tgz", @@ -3462,6 +3471,36 @@ "node": ">=0.10.0" } }, + "node_modules/react-router": { + "version": "6.24.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.24.0.tgz", + "integrity": "sha512-sQrgJ5bXk7vbcC4BxQxeNa5UmboFm35we1AFK0VvQaz9g0LzxEIuLOhHIoZ8rnu9BO21ishGeL9no1WB76W/eg==", + "dependencies": { + "@remix-run/router": "1.17.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/react-router-dom": { + "version": "6.24.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.24.0.tgz", + "integrity": "sha512-960sKuau6/yEwS8e+NVEidYQb1hNjAYM327gjEyXlc6r3Skf2vtwuJ2l7lssdegD2YjoKG5l8MsVyeTDlVeY8g==", + "dependencies": { + "@remix-run/router": "1.17.0", + "react-router": "6.24.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, "node_modules/readable-stream": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", diff --git a/package.json b/package.json index 7c32e85..e1855e9 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-map-gl": "^7.1.7", + "react-router-dom": "^6.24.0", "sass": "^1.76.0" }, "devDependencies": { diff --git a/src/main.tsx b/src/main.tsx index 4907391..8436c36 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -3,9 +3,21 @@ import ReactDOM from 'react-dom/client' import App from './App.tsx' import 'mapbox-gl/dist/mapbox-gl.css'; import './index.scss' +import { RouterProvider, createBrowserRouter } from 'react-router-dom'; + +const router = createBrowserRouter([ + { + path: '/', + element: ( + + ) + } +], { + basename: import.meta.env.BASE_URL +}) ReactDOM.createRoot(document.getElementById('root')!).render( - + ) diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts index df80fb5..d32d66d 100644 --- a/src/vite-env.d.ts +++ b/src/vite-env.d.ts @@ -6,6 +6,7 @@ interface ImportMetaEnv { readonly VITE_REMOTE_FOOTER_MENU_ID: number readonly VITE_REMOTE_SOCIAL_LINKS_ID: number readonly VITE_LOCATION_API_URL: string; + readonly VITE_BASEURL: string; } interface ImportMeta { From 0e80254cd037b05012d4b32123cc2688394d6e9e Mon Sep 17 00:00:00 2001 From: Jim Barnes Date: Thu, 27 Jun 2024 13:48:08 -0400 Subject: [PATCH 06/10] Used the right variable name --- src/main.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.tsx b/src/main.tsx index 8436c36..d2618ce 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -13,7 +13,7 @@ const router = createBrowserRouter([ ) } ], { - basename: import.meta.env.BASE_URL + basename: import.meta.env.VITE_BASEURL }) ReactDOM.createRoot(document.getElementById('root')!).render( From 0351b1d509d7137276842d18f7e1ee1b8424c743 Mon Sep 17 00:00:00 2001 From: Jim Barnes Date: Thu, 27 Jun 2024 13:53:49 -0400 Subject: [PATCH 07/10] Updated package.json to serve the app under /map --- package-lock.json | 39 --------------------------------------- package.json | 4 ++-- src/main.tsx | 14 +------------- 3 files changed, 3 insertions(+), 54 deletions(-) diff --git a/package-lock.json b/package-lock.json index e09e9b7..2dc1d8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,6 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-map-gl": "^7.1.7", - "react-router-dom": "^6.24.0", "sass": "^1.76.0" }, "devDependencies": { @@ -1078,14 +1077,6 @@ "url": "https://opencollective.com/popperjs" } }, - "node_modules/@remix-run/router": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.17.0.tgz", - "integrity": "sha512-2D6XaHEVvkCn682XBnipbJjgZUU7xjLtA4dGJRBVUKpEaDYOZMENZoZjAOSb7qirxt5RupjzZxz4fK2FO+EFPw==", - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.17.2", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.17.2.tgz", @@ -3471,36 +3462,6 @@ "node": ">=0.10.0" } }, - "node_modules/react-router": { - "version": "6.24.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.24.0.tgz", - "integrity": "sha512-sQrgJ5bXk7vbcC4BxQxeNa5UmboFm35we1AFK0VvQaz9g0LzxEIuLOhHIoZ8rnu9BO21ishGeL9no1WB76W/eg==", - "dependencies": { - "@remix-run/router": "1.17.0" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "react": ">=16.8" - } - }, - "node_modules/react-router-dom": { - "version": "6.24.0", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.24.0.tgz", - "integrity": "sha512-960sKuau6/yEwS8e+NVEidYQb1hNjAYM327gjEyXlc6r3Skf2vtwuJ2l7lssdegD2YjoKG5l8MsVyeTDlVeY8g==", - "dependencies": { - "@remix-run/router": "1.17.0", - "react-router": "6.24.0" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "react": ">=16.8", - "react-dom": ">=16.8" - } - }, "node_modules/readable-stream": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", diff --git a/package.json b/package.json index e1855e9..b7e0291 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-map-gl": "^7.1.7", - "react-router-dom": "^6.24.0", "sass": "^1.76.0" }, "devDependencies": { @@ -37,5 +36,6 @@ "togeojson": "^0.16.0", "typescript": "^5.2.2", "vite": "^5.2.0" - } + }, + "homepage": "./map/" } diff --git a/src/main.tsx b/src/main.tsx index d2618ce..4907391 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -3,21 +3,9 @@ import ReactDOM from 'react-dom/client' import App from './App.tsx' import 'mapbox-gl/dist/mapbox-gl.css'; import './index.scss' -import { RouterProvider, createBrowserRouter } from 'react-router-dom'; - -const router = createBrowserRouter([ - { - path: '/', - element: ( - - ) - } -], { - basename: import.meta.env.VITE_BASEURL -}) ReactDOM.createRoot(document.getElementById('root')!).render( - + ) From 1f23e69873e48be50e828b7023f8d51765ba8a43 Mon Sep 17 00:00:00 2001 From: Jim Barnes Date: Thu, 27 Jun 2024 14:03:02 -0400 Subject: [PATCH 08/10] Updated build to build specifically for the map subdirectory --- package-lock.json | 39 +++++++++++++++++++++++++++++++++++++++ package.json | 3 ++- src/main.tsx | 14 +++++++++++++- vite.config.ts | 1 + 4 files changed, 55 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2dc1d8d..e09e9b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-map-gl": "^7.1.7", + "react-router-dom": "^6.24.0", "sass": "^1.76.0" }, "devDependencies": { @@ -1077,6 +1078,14 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/@remix-run/router": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.17.0.tgz", + "integrity": "sha512-2D6XaHEVvkCn682XBnipbJjgZUU7xjLtA4dGJRBVUKpEaDYOZMENZoZjAOSb7qirxt5RupjzZxz4fK2FO+EFPw==", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.17.2", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.17.2.tgz", @@ -3462,6 +3471,36 @@ "node": ">=0.10.0" } }, + "node_modules/react-router": { + "version": "6.24.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.24.0.tgz", + "integrity": "sha512-sQrgJ5bXk7vbcC4BxQxeNa5UmboFm35we1AFK0VvQaz9g0LzxEIuLOhHIoZ8rnu9BO21ishGeL9no1WB76W/eg==", + "dependencies": { + "@remix-run/router": "1.17.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/react-router-dom": { + "version": "6.24.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.24.0.tgz", + "integrity": "sha512-960sKuau6/yEwS8e+NVEidYQb1hNjAYM327gjEyXlc6r3Skf2vtwuJ2l7lssdegD2YjoKG5l8MsVyeTDlVeY8g==", + "dependencies": { + "@remix-run/router": "1.17.0", + "react-router": "6.24.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, "node_modules/readable-stream": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", diff --git a/package.json b/package.json index b7e0291..020a21a 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-map-gl": "^7.1.7", + "react-router-dom": "^6.24.0", "sass": "^1.76.0" }, "devDependencies": { @@ -37,5 +38,5 @@ "typescript": "^5.2.2", "vite": "^5.2.0" }, - "homepage": "./map/" + "homepage": "/map/" } diff --git a/src/main.tsx b/src/main.tsx index 4907391..fb53ba5 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -3,9 +3,21 @@ import ReactDOM from 'react-dom/client' import App from './App.tsx' import 'mapbox-gl/dist/mapbox-gl.css'; import './index.scss' +import { RouterProvider, createBrowserRouter } from 'react-router-dom'; + +const router = createBrowserRouter([ + { + path: '/', + element: ( + + ) + }, +], { + basename: import.meta.env.VITE_BASEURL +}); ReactDOM.createRoot(document.getElementById('root')!).render( - + ) diff --git a/vite.config.ts b/vite.config.ts index 387f204..df17b6c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,5 +3,6 @@ import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ + // base: '/map/', plugins: [react()], }) From 4fb01c5cd97e5aed7e8d258282825b25a1e0e519 Mon Sep 17 00:00:00 2001 From: Jim Barnes Date: Thu, 27 Jun 2024 14:03:54 -0400 Subject: [PATCH 09/10] Readded setting in the vite config --- vite.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index df17b6c..8c90d00 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,6 +3,6 @@ import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ - // base: '/map/', + base: '/map/', plugins: [react()], }) From a441a607aee825ab1e4d6a9e40943e9cd87eac01 Mon Sep 17 00:00:00 2001 From: Jim Barnes Date: Thu, 27 Jun 2024 14:27:58 -0400 Subject: [PATCH 10/10] Updated workflows and data paths --- ...e-static-web-apps-brave-wave-05c9ff40f.yml | 1 + ...tic-web-apps-delightful-moss-0832eaa0f.yml | 2 +- ...-static-web-apps-lively-hill-0d219190f.yml | 1 + src/App.tsx | 42 +++++++++---------- 4 files changed, 24 insertions(+), 22 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-brave-wave-05c9ff40f.yml b/.github/workflows/azure-static-web-apps-brave-wave-05c9ff40f.yml index c7ca52d..88439ba 100644 --- a/.github/workflows/azure-static-web-apps-brave-wave-05c9ff40f.yml +++ b/.github/workflows/azure-static-web-apps-brave-wave-05c9ff40f.yml @@ -21,6 +21,7 @@ jobs: VITE_REMOTE_FOOTER_MENU_ID: ${{ vars.VITE_REMOTE_FOOTER_MENU_ID }} VITE_REMOTE_SOCIAL_LINKS_ID: ${{ vars.VITE_REMOTE_SOCIAL_LINKS_ID }} VITE_LOCATION_API_URL: ${{ vars.VITE_LOCATION_API_URL_LIVE }} + VITE_BASEURL: ${{ vars.VITE_BASEURL }} name: Build and Deploy Job steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/azure-static-web-apps-delightful-moss-0832eaa0f.yml b/.github/workflows/azure-static-web-apps-delightful-moss-0832eaa0f.yml index d95b916..a81be97 100644 --- a/.github/workflows/azure-static-web-apps-delightful-moss-0832eaa0f.yml +++ b/.github/workflows/azure-static-web-apps-delightful-moss-0832eaa0f.yml @@ -21,7 +21,7 @@ jobs: VITE_REMOTE_FOOTER_MENU_ID: ${{ vars.VITE_REMOTE_FOOTER_MENU_ID }} VITE_REMOTE_SOCIAL_LINKS_ID: ${{ vars.VITE_REMOTE_SOCIAL_LINKS_ID }} VITE_LOCATION_API_URL: ${{ vars.VITE_LOCATION_API_URL_DEV }} - VITE_BASEURL: ${{ vars.VITE_BASEURL_DEV }} + VITE_BASEURL: ${{ vars.VITE_BASEURL }} name: Build and Deploy Job steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/azure-static-web-apps-lively-hill-0d219190f.yml b/.github/workflows/azure-static-web-apps-lively-hill-0d219190f.yml index d92431d..972e125 100644 --- a/.github/workflows/azure-static-web-apps-lively-hill-0d219190f.yml +++ b/.github/workflows/azure-static-web-apps-lively-hill-0d219190f.yml @@ -21,6 +21,7 @@ jobs: VITE_REMOTE_FOOTER_MENU_ID: ${{ vars.VITE_REMOTE_FOOTER_MENU_ID }} VITE_REMOTE_SOCIAL_LINKS_ID: ${{ vars.VITE_REMOTE_SOCIAL_LINKS_ID }} VITE_LOCATION_API_URL: ${{ vars.VITE_LOCATION_API_URL_TEST }} + VITE_BASEURL: ${{ vars.VITE_BASEURL }} name: Build and Deploy Job steps: - uses: actions/checkout@v3 diff --git a/src/App.tsx b/src/App.tsx index 2228c39..8e300be 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -277,92 +277,92 @@ function App() { useMemo(() => { // Location data - fetch('/data/geojson/locations/buildingPoints.geojson') + fetch('data/geojson/locations/buildingPoints.geojson') .then((responseText) => responseText.json()) .then((response) => setBuildingPointData(response)); - fetch('/data/geojson/locations/buildingShapes.geojson') + fetch('data/geojson/locations/buildingShapes.geojson') .then((responseText) => responseText.json()) .then((response) => setBuildingFootprintData(response)); - fetch('/data/geojson/locations/dining.geojson') + fetch('data/geojson/locations/dining.geojson') .then((responseText) => responseText.json()) .then((response) => setDiningData(response)); - fetch('/data/geojson/locations/housing.geojson') + fetch('data/geojson/locations/housing.geojson') .then((responseText) => responseText.json()) .then((response) => setHousingData(response)); - fetch('/data/geojson/locations/labs.geojson') + fetch('data/geojson/locations/labs.geojson') .then((responseText) => responseText.json()) .then((response) => setLabData(response)); - fetch('/data/geojson/locations/retail.geojson') + fetch('data/geojson/locations/retail.geojson') .then((responseText) => responseText.json()) .then((response) => setRetailData(response)); // Parking Data - fetch('/data/geojson/parking.geojson') + fetch('data/geojson/parking.geojson') .then((responseText) => responseText.json()) .then((response) => setParkingData(response)); // Outdoor Data - fetch('/data/geojson/outdoors/greenspaces.geojson') + fetch('data/geojson/outdoors/greenspaces.geojson') .then((responseText) => responseText.json()) .then((response) => setGreenSpaceData(response)); - fetch('/data/geojson/outdoors/recreation.geojson') + fetch('data/geojson/outdoors/recreation.geojson') .then((responseText) => responseText.json()) .then((response) => setRecreationData(response)); - fetch('/data/geojson/outdoors/well-being.geojson') + fetch('data/geojson/outdoors/well-being.geojson') .then((responseText) => responseText.json()) .then((response) => setWellBeingdata(response)); // Accessibility Data - fetch('/data/geojson/accessibility/accessibleParking.geojson') + fetch('data/geojson/accessibility/accessibleParking.geojson') .then((responseText) => responseText.json()) .then((response) => setAccessibleParkingData(response)); - fetch('/data/geojson/accessibility/buildingRamps.geojson') + fetch('data/geojson/accessibility/buildingRamps.geojson') .then((responseText) => responseText.json()) .then((response) => setBuildingRampData(response)); - fetch('/data/geojson/accessibility/curbRamps.geojson') + fetch('data/geojson/accessibility/curbRamps.geojson') .then((responseText) => responseText.json()) .then((response) => setCurbRampData(response)); - fetch('/data/geojson/accessibility/autoDoor.geojson') + fetch('data/geojson/accessibility/autoDoor.geojson') .then((responseText) => responseText.json()) .then((response) => setAutoDoorData(response)); // Icon Data - fetch('/data/geojson/shuttles.geojson') + fetch('data/geojson/shuttles.geojson') .then((responseText) => responseText.json()) .then((response) => setShuttleStopData(response)); - fetch('/data/geojson/emergency-phones.geojson') + fetch('data/geojson/emergency-phones.geojson') .then((responseText) => responseText.json()) .then((response) => setEmergencyPhoneData(response)); // Other Data - fetch('/data/geojson/other/bikeRacks.geojson') + fetch('data/geojson/other/bikeRacks.geojson') .then((responseText) => responseText.json()) .then((response) => setBikeRackData(response)); - fetch('/data/geojson/other/family.geojson') + fetch('data/geojson/other/family.geojson') .then((responseText) => responseText.json()) .then((response) => setFamilyData(response)); - fetch('/data/geojson/other/pantry.geojson') + fetch('data/geojson/other/pantry.geojson') .then((responseText) => responseText.json()) .then((response) => setPantryData(response)); - fetch('/data/geojson/other/art.geojson') + fetch('data/geojson/other/art.geojson') .then((responseText) => responseText.json()) .then((response) => setArtData(response)); - fetch('/data/geojson/other/services.geojson') + fetch('data/geojson/other/services.geojson') .then((responseText) => responseText.json()) .then((response) => setServiceData(response)); }, []);