Skip to content

Commit

Permalink
fix(gui): remove error when using 3rd-party distribution (#948)
Browse files Browse the repository at this point in the history
  • Loading branch information
zccz14 authored Dec 16, 2024
1 parent 2011cdf commit 560d685
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ui/web/src/modules/Pages/Page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { IconClose, IconRefresh } from '@douyinfe/semi-icons';
import { Button, ButtonGroup, Space, Typography } from '@douyinfe/semi-ui';
import { Bug } from '@icon-park/react';
import { Space, Typography } from '@douyinfe/semi-ui';
import { formatTime } from '@yuants/data-model';
import { useObservableState } from 'observable-hooks';
import React, { useContext, useEffect } from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { useTranslation } from 'react-i18next';
import { executeCommand } from '../CommandCenter';
import { ErrorBoundary } from './ErrorBoundary';
import { AvailableComponents, pageRegistered$ } from './model';
Expand All @@ -24,10 +23,11 @@ export const Page = React.memo((props: { page: IPage }) => {
return (
<ErrorBoundary
fallback={({ error, reset }) => {
console.error(formatTime(Date.now()), error);
return (
<Space vertical>
<Typography.Title heading={3}>{t('Page:render_error', { message: `${error}` })}</Typography.Title>
<Trans t={t} i18nKey={'Page:render_error_hint'} />
{/* <Trans t={t} i18nKey={'Page:render_error_hint'} />
<Typography.Text style={{ whiteSpace: 'pre' }} copyable>
{error.stack}
</Typography.Text>
Expand Down Expand Up @@ -58,7 +58,7 @@ export const Page = React.memo((props: { page: IPage }) => {
>
{t('common:report_bug')}
</Button>
</ButtonGroup>
</ButtonGroup> */}
</Space>
);
}}
Expand Down

0 comments on commit 560d685

Please sign in to comment.