diff --git a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/View.tsx b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/View.tsx index daac164e8c..0b14171b98 100644 --- a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/View.tsx +++ b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/View.tsx @@ -179,7 +179,8 @@ export const View = (props: Props) => { const exposureStatus = getExposureStatus( exposure, props.enabledFeatureFlags.includes("AdditionalRemovalStatuses"), - isDataBrokerUnderMaintenance(exposure), + // TODO: Waiting for criteria for data brokers under maintenance to be determined + // isDataBrokerUnderMaintenance(exposure), ); return ( @@ -561,11 +562,12 @@ export const View = (props: Props) => { ); }; -export function isDataBrokerUnderMaintenance( - exposure: Exposure | OnerepScanResultDataBrokerRow, -): boolean { - return ( - isScanResult(exposure) && - exposure.broker_status === "removal_under_maintenance" - ); -} +// TODO: Waiting for criteria for data brokers under maintenace to be determined +// export function isDataBrokerUnderMaintenance( +// exposure: Exposure | OnerepScanResultDataBrokerRow, +// ): boolean { +// return ( +// isScanResult(exposure) && +// exposure.broker_status === "removal_under_maintenance" +// ); +// } diff --git a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/data-broker-profiles/removal-under-maintenance/page.tsx b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/data-broker-profiles/removal-under-maintenance/page.tsx index cb9c437eb6..61ec578ad9 100644 --- a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/data-broker-profiles/removal-under-maintenance/page.tsx +++ b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/fix/data-broker-profiles/removal-under-maintenance/page.tsx @@ -19,13 +19,29 @@ import { getSubscriberBreaches } from "../../../../../../../../../functions/serv import { getSubscriberEmails } from "../../../../../../../../../functions/server/getSubscriberEmails"; import { RemovalUnderMaintenanceView } from "./RemovalUnderMaintenanceView"; import { hasPremium } from "../../../../../../../../../functions/universal/user"; +import { getEnabledFeatureFlags } from "../../../../../../../../../../db/tables/featureFlags"; +import { AutoSignIn } from "../../../../../../../../../components/client/AutoSignIn"; export default async function RemovalUnderMaintenance() { const session = await getServerSession(); const countryCode = getCountryCode(headers()); - if (!session?.user?.subscriber?.id || !hasPremium(session.user)) { + + if (!session) { + return ; + } + + const enabledFeatureFlags = await getEnabledFeatureFlags({ + email: session.user.email, + }); + + if ( + !session?.user?.subscriber?.id || + !hasPremium(session.user) || + !enabledFeatureFlags.includes("EnableRemovalUnderMaintenanceStep") + ) { redirect("/user/dashboard"); } + const profileId = await getOnerepProfileId(session.user.subscriber.id); const latestScan = await getScanResultsWithBroker( profileId, diff --git a/src/app/components/client/FixNavigation.tsx b/src/app/components/client/FixNavigation.tsx index 58df6ff375..2b9668cced 100644 --- a/src/app/components/client/FixNavigation.tsx +++ b/src/app/components/client/FixNavigation.tsx @@ -82,9 +82,10 @@ export const Steps = (props: { {label} {count > 0 && `(${count})`} ); - const dataBrokerStepCompleted = - hasCompletedStepSection(props.data, "Scan") && - hasCompletedStepSection(props.data, "DataBrokerManualRemoval"); + const dataBrokerStepCompleted = hasCompletedStepSection(props.data, "Scan"); + // TODO: MNTOR-3880 Waiting for criteria for data brokers under maintenace to be determined + // && hasCompletedStepSection(props.data, "DataBrokerManualRemoval"); + return (