From 68fb61bf1caac440161daa1ad2d0743ec493dd50 Mon Sep 17 00:00:00 2001 From: Christopher Berge Hove Date: Tue, 28 Jan 2025 13:31:11 +0100 Subject: [PATCH] feat: enable feature flagging for landing page --- .../src/components/portal-router/PortalPage.tsx | 2 +- .../src/lib/portal-framework-config.tsx | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/packages/portal-client/src/components/portal-router/PortalPage.tsx b/client/packages/portal-client/src/components/portal-router/PortalPage.tsx index 4f623108..e9e5c561 100644 --- a/client/packages/portal-client/src/components/portal-router/PortalPage.tsx +++ b/client/packages/portal-client/src/components/portal-router/PortalPage.tsx @@ -4,7 +4,7 @@ import { LoadPage } from './LoadPage'; import { useFeature } from '@equinor/fusion-framework-react-app/feature-flag'; export const PortalPage = (prop: { route?: Partial }) => { - const { feature } = { feature: { enabled: false } }; //useFeature('landing-page'); + const { feature } = useFeature('landing-page'); switch (prop.route?.pageKey) { case 'project-portal': return ( diff --git a/client/packages/portal-client/src/lib/portal-framework-config.tsx b/client/packages/portal-client/src/lib/portal-framework-config.tsx index 288cf52d..7952793c 100644 --- a/client/packages/portal-client/src/lib/portal-framework-config.tsx +++ b/client/packages/portal-client/src/lib/portal-framework-config.tsx @@ -123,13 +123,13 @@ export function createPortalFramework(portalConfig: PortalConfig) { enableFeatureFlagging(config, (builder) => { builder.addPlugin( createLocalStoragePlugin([ - // { - // key: 'landing-page', - // title: 'New Landing pages', - // description: - // 'When enabled you will get new landing pages in the portal. The functionality is the same but the loading is done differently', - // enabled: false, - // }, + { + key: 'landing-page', + title: 'New Landing pages', + description: + 'When enabled you will get new landing pages in the portal. The functionality is the same but the loading is done differently', + enabled: false, + }, { key: 'project-prediction', title: 'Allocated Projects',