diff --git a/src/app/projects/[id]/page.js b/src/app/projects/[id]/page.js index a58f6fb..b3cd002 100644 --- a/src/app/projects/[id]/page.js +++ b/src/app/projects/[id]/page.js @@ -17,8 +17,8 @@ import ProjectMap from "@/components/ui/ProjectMap"; export default async function ProjectViewPage({ params }) { const { id } = await params; - const project = getProjectWithContract(id); - const notes = getNotesForProject(id); + const project = await getProjectWithContract(id); + const notes = await getNotesForProject(id); if (!project) { return ( diff --git a/src/components/ui/LeafletMap.js b/src/components/ui/LeafletMap.js index 54946c9..f3981e2 100644 --- a/src/components/ui/LeafletMap.js +++ b/src/components/ui/LeafletMap.js @@ -56,8 +56,6 @@ function WMSLayer({ url, params, opacity = 1, attribution }) { // Fix for default markers in react-leaflet const fixLeafletIcons = () => { if (typeof window !== "undefined") { - const L = require("leaflet"); - delete L.Icon.Default.prototype._getIconUrl; L.Icon.Default.mergeOptions({ iconRetinaUrl: "/leaflet/marker-icon-2x.png", @@ -70,8 +68,6 @@ const fixLeafletIcons = () => { // Create colored marker icons const createColoredMarkerIcon = (color) => { if (typeof window !== "undefined") { - const L = require("leaflet"); - return new L.Icon({ iconUrl: `data:image/svg+xml;base64,${btoa(`