Skip to content

Commit

Permalink
Merge branch 'feature/AB#19675' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefwint committed Jul 2, 2024
2 parents 196f6cf + 29d9e53 commit 39fde20
Showing 1 changed file with 22 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Transition } from '@headlessui/react'
import { FieldSelect, Heading, Text } from '@pzh-ui/components'
import { Heading, Text } from '@pzh-ui/components'
import { ArrowLeft, DrawPolygon, LocationDot } from '@pzh-ui/icons'
import Leaflet, { latLng } from 'leaflet'
import { ReactNode, useEffect, useMemo, useState } from 'react'
import { ReactNode, useEffect, useState } from 'react'
import { useNavigate } from 'react-router-dom'

import { useWerkingsgebiedenValidGet } from '@/api/fetchers'
import { LeafletSearchInput } from '@/components/Leaflet'
import { MAP_SEARCH_PAGE } from '@/constants/leaflet'
import useSearchParam from '@/hooks/useSearchParam'
Expand All @@ -32,24 +31,24 @@ const SidebarInformation = ({ onDraw }: SidebarInformationProps) => {
const [werkingsgebied, setWerkingsgebied] =
useState<Leaflet.TileLayer.WMS | null>(null)

const { data, isLoading } = useWerkingsgebiedenValidGet({
limit: 1000,
sort_column: 'Title',
sort_order: 'ASC',
})
const selectedVal = useMemo(
() => data?.results.find(item => item.UUID === paramWerkingsgebied),
[data, paramWerkingsgebied]
)

const options = useMemo(
() =>
data?.results.map(option => ({
label: option.Title,
value: option.Area_UUID,
})),
[data]
)
// const { data, isLoading } = useWerkingsgebiedenValidGet({
// limit: 1000,
// sort_column: 'Title',
// sort_order: 'ASC',
// })
// const selectedVal = useMemo(
// () => data?.results.find(item => item.UUID === paramWerkingsgebied),
// [data, paramWerkingsgebied]
// )

// const options = useMemo(
// () =>
// data?.results.map(option => ({
// label: option.Title,
// value: option.Area_UUID,
// })),
// [data]
// )

const goBack = () => {
navigate(MAP_SEARCH_PAGE)
Expand Down Expand Up @@ -149,7 +148,7 @@ const SidebarInformation = ({ onDraw }: SidebarInformationProps) => {
</>
)}

<InfoText
{/* <InfoText
title="Werkingsgebied"
description="Selecteer een werkingsgebied om het gekoppelde beleid in te zien."
/>
Expand Down Expand Up @@ -186,7 +185,7 @@ const SidebarInformation = ({ onDraw }: SidebarInformationProps) => {
)
}}
/>
)}
)} */}
</Transition>

<Transition
Expand Down

0 comments on commit 39fde20

Please sign in to comment.