mirror of
https://github.com/logto-io/logto.git
synced 2025-02-17 22:04:19 -05:00
fix(console): open demo app on cloud congrats page (#3134)
This commit is contained in:
parent
4c384a7715
commit
d6e4b7ac46
1 changed files with 5 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
import classNames from 'classnames';
|
||||
import { useContext } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
|
@ -8,6 +9,7 @@ import GetStarted from '@/assets/images/get-started.svg';
|
|||
import Button from '@/components/Button';
|
||||
import Divider from '@/components/Divider';
|
||||
import OverlayScrollbar from '@/components/OverlayScrollbar';
|
||||
import { AppEndpointsContext } from '@/containers/AppEndpointsProvider';
|
||||
import * as pageLayout from '@/pages/Cloud/layout.module.scss';
|
||||
import { buildUrl } from '@/utils/url';
|
||||
|
||||
|
@ -18,6 +20,8 @@ import * as styles from './index.module.scss';
|
|||
|
||||
const Congrats = () => {
|
||||
const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' });
|
||||
const { userEndpoint } = useContext(AppEndpointsContext);
|
||||
|
||||
const navigate = useNavigate();
|
||||
|
||||
const enterAdminConsole = () => {
|
||||
|
@ -41,7 +45,7 @@ const Congrats = () => {
|
|||
title="cloud.congrats.check_out_button"
|
||||
icon={<AirPlay className={styles.buttonIcon} />}
|
||||
onClick={() => {
|
||||
window.open('/demo-app', '_blank');
|
||||
window.open(new URL('/demo-app', userEndpoint), '_blank');
|
||||
}}
|
||||
/>
|
||||
<Divider className={styles.divider} />
|
||||
|
|
Loading…
Add table
Reference in a new issue