From 29ac5c9e8ec015d3d0926590826d31e6628c8347 Mon Sep 17 00:00:00 2001 From: Charles Zhao Date: Wed, 16 Aug 2023 17:29:32 +0800 Subject: [PATCH] chore(console): enable guide v2 in production env (#4341) * chore(console): enable guide v2 in production env * fix: eslint --- packages/console/src/consts/env.ts | 1 + .../pages/Applications/components/Guide/GuideModal.tsx | 10 +--------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/console/src/consts/env.ts b/packages/console/src/consts/env.ts index 147fa6d25..8ceda539e 100644 --- a/packages/console/src/consts/env.ts +++ b/packages/console/src/consts/env.ts @@ -1,5 +1,6 @@ import { yes } from '@silverhand/essentials'; +// eslint-disable-next-line import/no-unused-modules export const isProduction = process.env.NODE_ENV === 'production'; export const isCloud = yes(process.env.IS_CLOUD); export const adminEndpoint = process.env.ADMIN_ENDPOINT; diff --git a/packages/console/src/pages/Applications/components/Guide/GuideModal.tsx b/packages/console/src/pages/Applications/components/Guide/GuideModal.tsx index 193c133d4..50337345c 100644 --- a/packages/console/src/pages/Applications/components/Guide/GuideModal.tsx +++ b/packages/console/src/pages/Applications/components/Guide/GuideModal.tsx @@ -1,13 +1,10 @@ import type { Application } from '@logto/schemas'; import Modal from 'react-modal'; -import { isProduction } from '@/consts/env'; import * as modalStyles from '@/scss/modal.module.scss'; import GuideV2 from '../GuideV2'; -import Guide from '.'; - type Props = { guideId: string; app?: Application; @@ -30,12 +27,7 @@ function GuideModal({ guideId, app, onClose }: Props) { className={modalStyles.fullScreen} onRequestClose={closeModal} > - {/* Switch to v2 once migration is complete. */} - {isProduction ? ( - - ) : ( - - )} + ); }