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:
parent
d958494848
commit
29ac5c9e8e
2 changed files with 2 additions and 9 deletions
|
@ -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;
|
||||
|
|
|
@ -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} />
|
||||
)}
|
||||
<GuideV2 guideId={guideId} app={app} onClose={closeModal} />
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue