0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

chore(console): enable guide v2 in production env (#4341)

* chore(console): enable guide v2 in production env

* fix: eslint
This commit is contained in:
Charles Zhao 2023-08-16 17:29:32 +08:00 committed by GitHub
parent d958494848
commit 29ac5c9e8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 9 deletions

View file

@ -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;

View file

@ -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 ? (
<Guide app={app} onClose={closeModal} />
) : (
<GuideV2 guideId={guideId} app={app} onClose={closeModal} />
)}
</Modal>
);
}