Skip to content

Commit

Permalink
Implement hook
Browse files Browse the repository at this point in the history
  • Loading branch information
timvanoostrom committed Dec 12, 2024
1 parent efb8b06 commit 6c49ad9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/client/pages/Parkeren/useParkerenData.hook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<DecosCaseType> = new Set([
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 6c49ad9

Please sign in to comment.