From b367b6d89c9ce01980cdccdd74ada75057f4ea69 Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 13 Jan 2025 12:41:54 +0100 Subject: [PATCH] Pr feedback fix --- .../locatie/kies/_components/BaseLayer.test.tsx | 2 +- apps/public/src/app/(map)/locatie/kies/page.tsx | 16 ++-------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/apps/public/src/app/(map)/locatie/kies/_components/BaseLayer.test.tsx b/apps/public/src/app/(map)/locatie/kies/_components/BaseLayer.test.tsx index 38461333..48e58595 100644 --- a/apps/public/src/app/(map)/locatie/kies/_components/BaseLayer.test.tsx +++ b/apps/public/src/app/(map)/locatie/kies/_components/BaseLayer.test.tsx @@ -4,7 +4,7 @@ import { BaseLayer } from './BaseLayer' describe('BaseLayer', () => { it('renders the component', () => { - const { container } = render() + const { container } = render( {}} />) expect(container.firstChild).toBeInTheDocument() }) }) diff --git a/apps/public/src/app/(map)/locatie/kies/page.tsx b/apps/public/src/app/(map)/locatie/kies/page.tsx index ad2542a2..27e67d6c 100644 --- a/apps/public/src/app/(map)/locatie/kies/page.tsx +++ b/apps/public/src/app/(map)/locatie/kies/page.tsx @@ -2,10 +2,9 @@ import { Grid } from '@amsterdam/design-system-react' import dynamic from 'next/dynamic' -import { useEffect, useState } from 'react' +import { useState } from 'react' import { SideBar } from './_components/SideBar/SideBar' -import { reverseGeocodeService } from './utils.ts/reverse-geocode-service' export type Coordinates = { lat: number; lon: number } @@ -16,23 +15,12 @@ const Map = dynamic(() => import('./_components/BaseLayer').then((module) => mod const KiesLocatie = () => { const [coordinates, setCoordinates] = useState(null) - const [address, setAddress] = useState(null) - - useEffect(() => { - const getAddress = async () => { - if (!coordinates) return - const result = await reverseGeocodeService({ lat: coordinates.lat, lon: coordinates.lon }) - - setAddress(result.response.docs[0].weergavenaam) - } - getAddress() - }, [coordinates]) return ( // TODO: Create a compact grid with padding 24px and the map that overflows it. https://designsystem.amsterdam/?path=/docs/brand-design-tokens-grid--docs - +