From 6c49ad9f5e1d69f29d32464337369ba774689317 Mon Sep 17 00:00:00 2001 From: Tim van Oostrom Date: Thu, 12 Dec 2024 15:17:08 +0100 Subject: [PATCH] Implement hook --- src/client/pages/Parkeren/useParkerenData.hook.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/pages/Parkeren/useParkerenData.hook.tsx b/src/client/pages/Parkeren/useParkerenData.hook.tsx index a02458ac8..40d446011 100644 --- a/src/client/pages/Parkeren/useParkerenData.hook.tsx +++ b/src/client/pages/Parkeren/useParkerenData.hook.tsx @@ -5,6 +5,7 @@ import { isError, isLoading } from '../../../universal/helpers/api'; import { CaseType, DecosCaseType } from '../../../universal/types/vergunningen'; import { addLinkElementToProperty } from '../../components/Table/TableV2'; import { useAppStateGetter } from '../../hooks/useAppState'; +import { useVergunningenTransformed } from '../Vergunningen/useVergunningenTransformed.hook'; import { tableConfig } from '../VergunningenV2/config'; export const PARKEER_CASE_TYPES: Set = new Set([ @@ -40,7 +41,10 @@ export function useParkerenData() { const vergunningenState = FeatureToggle.vergunningenV2Active ? VERGUNNINGENv2 : VERGUNNINGEN; - const vergunningen = vergunningenState.content; + const vergunningen = + (vergunningenState === VERGUNNINGEN + ? useVergunningenTransformed(VERGUNNINGEN) + : VERGUNNINGENv2.content) ?? []; const parkeerVergunningenFromThemaVergunningen = getVergunningenFromThemaVergunningen(vergunningen);