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';
|
import { yes } from '@silverhand/essentials';
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-unused-modules
|
||||||
export const isProduction = process.env.NODE_ENV === 'production';
|
export const isProduction = process.env.NODE_ENV === 'production';
|
||||||
export const isCloud = yes(process.env.IS_CLOUD);
|
export const isCloud = yes(process.env.IS_CLOUD);
|
||||||
export const adminEndpoint = process.env.ADMIN_ENDPOINT;
|
export const adminEndpoint = process.env.ADMIN_ENDPOINT;
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
import type { Application } from '@logto/schemas';
|
import type { Application } from '@logto/schemas';
|
||||||
import Modal from 'react-modal';
|
import Modal from 'react-modal';
|
||||||
|
|
||||||
import { isProduction } from '@/consts/env';
|
|
||||||
import * as modalStyles from '@/scss/modal.module.scss';
|
import * as modalStyles from '@/scss/modal.module.scss';
|
||||||
|
|
||||||
import GuideV2 from '../GuideV2';
|
import GuideV2 from '../GuideV2';
|
||||||
|
|
||||||
import Guide from '.';
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
guideId: string;
|
guideId: string;
|
||||||
app?: Application;
|
app?: Application;
|
||||||
|
@ -30,12 +27,7 @@ function GuideModal({ guideId, app, onClose }: Props) {
|
||||||
className={modalStyles.fullScreen}
|
className={modalStyles.fullScreen}
|
||||||
onRequestClose={closeModal}
|
onRequestClose={closeModal}
|
||||||
>
|
>
|
||||||
{/* Switch to v2 once migration is complete. */}
|
<GuideV2 guideId={guideId} app={app} onClose={closeModal} />
|
||||||
{isProduction ? (
|
|
||||||
<Guide app={app} onClose={closeModal} />
|
|
||||||
) : (
|
|
||||||
<GuideV2 guideId={guideId} app={app} onClose={closeModal} />
|
|
||||||
)}
|
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue