Skip to content

Commit

Permalink
Merge branch 'develop' into test
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbarne3 committed Jun 27, 2024
2 parents 9688668 + a441a60 commit f7159cb
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -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=/
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
name: Build and Deploy Job
steps:
- uses: actions/checkout@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 39 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -36,5 +37,6 @@
"togeojson": "^0.16.0",
"typescript": "^5.2.2",
"vite": "^5.2.0"
}
},
"homepage": "/map/"
}
42 changes: 21 additions & 21 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}, []);
Expand Down
14 changes: 13 additions & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: (
<App />
)
},
], {
basename: import.meta.env.VITE_BASEURL
});

ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<App />
<RouterProvider router={router} />
</React.StrictMode>
)
1 change: 1 addition & 0 deletions src/vite-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
base: '/map/',
plugins: [react()],
})

0 comments on commit f7159cb

Please sign in to comment.