mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-08 02:52:07 +08:00
chore: update i18n
This commit is contained in:
@@ -1,18 +1,20 @@
|
||||
import { ReactNode } from 'react'
|
||||
import { ErrorBoundary, FallbackProps } from 'react-error-boundary'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
function ErrorFallback({ error }: FallbackProps) {
|
||||
const { t } = useTranslation()
|
||||
const errorMessage = error instanceof Error ? error.message : String(error)
|
||||
const errorStack = error instanceof Error ? error.stack : undefined
|
||||
|
||||
return (
|
||||
<div role="alert" style={{ padding: 16 }}>
|
||||
<h4>Something went wrong:(</h4>
|
||||
<h4>{t('shared.feedback.errors.unexpected')}</h4>
|
||||
|
||||
<pre>{errorMessage}</pre>
|
||||
|
||||
<details title="Error Stack">
|
||||
<summary>Error Stack</summary>
|
||||
<details title={t('shared.feedback.errors.stack')}>
|
||||
<summary>{t('shared.feedback.errors.stack')}</summary>
|
||||
<pre>{errorStack}</pre>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user