From 6a2f6cfe2e64f0209734dd7b71a06a86947e7077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Eorkell=20M=C3=A1ni=20=C3=9Eorkelsson?= Date: Wed, 11 Dec 2024 14:43:56 +0000 Subject: [PATCH] chore: revert inoem plan detail --- .../IncomePlanDetail/IncomePlanDetail.tsx | 53 ++----------------- 1 file changed, 5 insertions(+), 48 deletions(-) diff --git a/libs/portals/my-pages/social-insurance-maintenance/src/screens/IncomePlanDetail/IncomePlanDetail.tsx b/libs/portals/my-pages/social-insurance-maintenance/src/screens/IncomePlanDetail/IncomePlanDetail.tsx index 51878ab260c9..f5728ec8799d 100644 --- a/libs/portals/my-pages/social-insurance-maintenance/src/screens/IncomePlanDetail/IncomePlanDetail.tsx +++ b/libs/portals/my-pages/social-insurance-maintenance/src/screens/IncomePlanDetail/IncomePlanDetail.tsx @@ -1,4 +1,5 @@ import { + Box, Inline, Stack, Button, @@ -9,66 +10,22 @@ import { import { useLocale, useNamespaces } from '@island.is/localization' import { EmptyTable, + FootNote, + IntroHeader, IntroWrapper, LinkButton, amountFormat, m as coreMessages, } from '@island.is/portals/my-pages/core' import { m } from '../../lib/messages' -import { - useGetIncomePlanDetailLazyQuery, - useGetIncomePlanDetailQuery, -} from './IncomePlanDetail.generated' +import { useGetIncomePlanDetailQuery } from './IncomePlanDetail.generated' import { Problem } from '@island.is/react-spa/shared' -import { useEffect, useState } from 'react' -import { useFeatureFlagClient } from '@island.is/react/feature-flags' const IncomePlanDetail = () => { useNamespaces('sp.social-insurance-maintenance') const { formatMessage } = useLocale() - const [displayPaymentPlan, setDisplayPaymentPlan] = useState(false) - const [query, { data, loading, error }] = useGetIncomePlanDetailLazyQuery() - - const featureFlagClient = useFeatureFlagClient() - useEffect(() => { - const isFlagEnabled = async () => { - const ffEnabled = await featureFlagClient.getValue( - `isServicePortalPaymentPlan2025Enabled`, - false, - ) - if (ffEnabled) { - setDisplayPaymentPlan(ffEnabled as boolean) - } - } - isFlagEnabled() - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []) - - useEffect(() => { - if (displayPaymentPlan) { - query() - } - }, [displayPaymentPlan]) - - if (!displayPaymentPlan) { - return ( - - - - ) - } - + const { data, loading, error } = useGetIncomePlanDetailQuery() return (