diff --git a/package-lock.json b/package-lock.json index 12a7edfd..91c7fade 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "react-dom": "^18.2.0", "react-rnd": "^10.4.1", "react-router-dom": "^6.23.0", - "utopia-ui": "^3.0.0-alpha.216" + "utopia-ui": "^3.0.0-alpha.253" }, "devDependencies": { "@types/react": "^18.2.79", @@ -1969,20 +1969,20 @@ } }, "node_modules/@tanstack/query-core": { - "version": "5.51.9", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.51.9.tgz", - "integrity": "sha512-HsAwaY5J19MD18ykZDS3aVVh+bAt0i7m6uQlFC2b77DLV9djo+xEN7MWQAQQTR8IM+7r/zbozTQ7P0xr0bHuew==", + "version": "5.51.16", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.51.16.tgz", + "integrity": "sha512-zfV+WAtBGm1dUIbL0w/x8qTqVLKU1/Bo1p19J9LF02MmIc4FxzMImMXhFzYJQl5Hx8Wit6RiQ4tB/DvN8y9zaQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" } }, "node_modules/@tanstack/react-query": { - "version": "5.51.11", - "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.51.11.tgz", - "integrity": "sha512-4Kq2x0XpDlpvSnaLG+8pHNH60zEc3mBvb3B2tOMDjcPCi/o+Du3p/9qpPLwJOTliVxxPJAP27fuIhLrsRdCr7A==", + "version": "5.51.16", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.51.16.tgz", + "integrity": "sha512-NZnpJ30zkwaA2ZPhxJLs/qoMbd0yNAj6yyb3JTADJx9HjSdtvnNzOY1bDa3bU1B9CZTBBb7W9E1PpWlNXdgESg==", "dependencies": { - "@tanstack/query-core": "5.51.9" + "@tanstack/query-core": "5.51.16" }, "funding": { "type": "github", @@ -7250,9 +7250,9 @@ "license": "MIT" }, "node_modules/utopia-ui": { - "version": "3.0.0-alpha.216", - "resolved": "https://registry.npmjs.org/utopia-ui/-/utopia-ui-3.0.0-alpha.216.tgz", - "integrity": "sha512-C7ItBnKfSKfVfYXXXeQ09TAJXpGCxPwxAiTjBvRKRP/klDefvFnL7sIjV9Cg17ccwv/fkz8RPknsdpfeZ93PDw==", + "version": "3.0.0-alpha.253", + "resolved": "https://registry.npmjs.org/utopia-ui/-/utopia-ui-3.0.0-alpha.253.tgz", + "integrity": "sha512-wzaoFtdgJAoR8RvM45BIc33v3NM2tsuse75tLoJX1r693AhlNBinucJYE4Aqyl2jHDESB8k88mcQ+O7nTBI5YQ==", "dependencies": { "@heroicons/react": "^2.0.17", "@tanstack/react-query": "^5.17.8", diff --git a/package.json b/package.json index e3cc9633..c65f0407 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "react-dom": "^18.2.0", "react-rnd": "^10.4.1", "react-router-dom": "^6.23.0", - "utopia-ui": "^3.0.0-alpha.216" + "utopia-ui": "^3.0.0-alpha.253" }, "devDependencies": { "@types/react": "^18.2.79", diff --git a/src/App.tsx b/src/App.tsx index 1e8f9934..5a13ef82 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -22,6 +22,8 @@ function App() { const [tagsApi, setTagsApi] = useState>(); const [mapApiInstance, setMapApiInstance] = useState(); const [layersApiInstance, setLayersApiInstance] = useState(); + const [attestationApi, setAttestationApi] = useState>(); + const [map, setMap] = useState(); const [layers, setLayers] = useState(); const [layerPageRoutes, setLayerPageRoutes] = useState(); @@ -31,6 +33,7 @@ function App() { useEffect(() => { setPermissionsApiInstance(new permissionsApi()); setMapApiInstance(new mapApi(window.location.origin)); + setAttestationApi(new itemsApi("attestations")); }, []) useEffect(() => { @@ -102,13 +105,13 @@ function App() { } /> } /> } /> - } /> + } /> } /> } /> } /> } /> } /> - } /> + } /> { layers.map((l: any) => } /> diff --git a/src/api/itemsApi.ts b/src/api/itemsApi.ts index ba07b58a..f5fec701 100644 --- a/src/api/itemsApi.ts +++ b/src/api/itemsApi.ts @@ -30,7 +30,7 @@ export class itemsApi implements ItemsApi{ async getItems() { try { - return await directusClient.request(readItems(this.collectionName as never, { fields: ['*', "relations.*", "user_created.*", {offers: ['*'], needs: ['*']}] , filter: this.filter, limit: -1 })); + return await directusClient.request(readItems(this.collectionName as never, { fields: ['*', 'to.*', "relations.*", "user_created.*", {offers: ['*'], needs: ['*']}] , filter: this.filter, limit: -1 })); } catch (error: any) { console.log(error); if (error.errors[0]?.message)