diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index 5f5821c..4ed70fa 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -28,9 +28,14 @@ jobs: # Build job build: runs-on: ubuntu-latest + env: + NEXT_PUBLIC_IMBOR_TOKEN: ${{env.NEXT_PUBLIC_IMBOR_TOKEN}} + NEXT_PUBLIC_MAPTILER_API_KEY: ${{env.NEXT_PUBLIC_MAPTILER_API_KEY}} steps: - name: Checkout uses: actions/checkout@v4 + - name: Create .env file + run: echo "NEXT_PUBLIC_IMBOR_TOKEN=${{ env.NEXT_PUBLIC_IMBOR_TOKEN }}" > .env - name: Detect package manager id: detect-package-manager run: | @@ -91,6 +96,3 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 - env: - NEXT_PUBLIC_IMBOR_TOKEN: ${{env.NEXT_PUBLIC_IMBOR_TOKEN}} - NEXT_PUBLIC_MAPTILER_API_KEY: ${{env.NEXT_PUBLIC_MAPTILER_API_KEY}} diff --git a/app/components/EditObject/EditObject.tsx b/app/components/EditObject/EditObject.tsx index 75272c5..6b141cd 100644 --- a/app/components/EditObject/EditObject.tsx +++ b/app/components/EditObject/EditObject.tsx @@ -122,7 +122,6 @@ const EditObject = () => { const geometryClickedCallback = async (e: any) => { // Get clicked object data const object: any = getObject(null, e.detail.uuid); - console.log('object', object) // If no object info was found: Stop executing if(! object) return; // Make edit form visible @@ -346,7 +345,7 @@ const EditObject = () => { const getGeoClass = (objectType: URL): boolean | string => { // Filter geoClasses on objectType const foundGeoClass = geoClasses.filter((x: any) => { - return x.classURI.value === objectType; + return x.classURI?.value === objectType; }) if(objectType === 'Wegvak' || objectType === 'Halteplaats') { return 'polygon';