diff --git a/index.html b/index.html index 8c62e310..731ef297 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - + diff --git a/package-lock.json b/package-lock.json index d00c3281..80ae592e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.11.2", - "utopia-ui": "^3.0.0-alpha.6" + "utopia-ui": "^3.0.0-alpha.8" }, "devDependencies": { "@types/react": "^18.0.28", @@ -6458,9 +6458,9 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/utopia-ui": { - "version": "3.0.0-alpha.6", - "resolved": "https://registry.npmjs.org/utopia-ui/-/utopia-ui-3.0.0-alpha.6.tgz", - "integrity": "sha512-HibKxHWRDvmbdfg7LXjpDlcnIB3UlH4VUthIEyQZSUbHX2AcfUYLNeyJ4dge9ub8iaoO4AgKZqhR2fuqWqgGig==", + "version": "3.0.0-alpha.8", + "resolved": "https://registry.npmjs.org/utopia-ui/-/utopia-ui-3.0.0-alpha.8.tgz", + "integrity": "sha512-a8w7mJxNPoVcG8GPbQNaIj64Sbj69lWtaxh7W62hpmg/PxgFmmU1pwxuRunUqalEUh3WYMvQIJxzNlHISZyIsg==", "dependencies": { "@heroicons/react": "^2.0.17", "leaflet": "^1.9.4", diff --git a/package.json b/package.json index a512f8d1..82da938b 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.11.2", - "utopia-ui": "^3.0.0-alpha.6" + "utopia-ui": "^3.0.0-alpha.8" }, "devDependencies": { "@types/react": "^18.0.28", diff --git a/src/App.tsx b/src/App.tsx index 198b12ca..7d8891c2 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,4 @@ -import { AppShell, SideBar, Content, AuthProvider, useAuth, Settings, Modal, Quests, LoginPage, SignupPage } from 'utopia-ui' +import { AppShell, SideBar, Content, AuthProvider, useAuth, Settings, Modal, LoginPage, SignupPage } from 'utopia-ui' import { routes } from './routes/sidebar' import { Route, Routes } from 'react-router-dom' import MapContainer from "./pages/MapContainer" @@ -20,7 +20,7 @@ function App() { - + {/** */} } /> } /> diff --git a/src/api/directus.ts b/src/api/directus.ts index 22a8d52d..554f4fbf 100644 --- a/src/api/directus.ts +++ b/src/api/directus.ts @@ -54,7 +54,7 @@ export type Place = { return auth!.refresh_token; } - export const directusClient = createDirectus("https://map.api.free-planet-earth.org/") + export const directusClient = createDirectus("https://api.utopia-lab.org/") .with(authentication()) .with(rest()) .with(authentication('json', { // add this if you want to use authentication, json is important, it's type of your authentication usage, here JWT diff --git a/src/api/itemsApi.ts b/src/api/itemsApi.ts index 6db214a7..cf7af405 100644 --- a/src/api/itemsApi.ts +++ b/src/api/itemsApi.ts @@ -15,10 +15,9 @@ export class itemsApi implements ItemsApi{ async getItems() { try { return await directusClient.request(readItems(this.collectionName as never,{limit: 500 })); - } catch (error) { - console.log(error); - throw new Error("Failed while loading items"); - } + } catch (error: any) { + console.log(error.errors[0].message); + throw new Error(error.errors[0].message); } } async createItem(item: T & { id?: string }) {