From 9749522cc4339ec1b43feac7ca10b6a5dada28cc Mon Sep 17 00:00:00 2001 From: Innei Date: Tue, 7 Jan 2025 23:58:57 +0800 Subject: [PATCH] chore: Updated ErrorDetail component to conditionally display "Hide error" or "Show error" based on the stack trace visibility. --- .../affine-error-boundary/error-basic/error-detail.tsx | 6 +++++- packages/frontend/i18n/src/resources/en.json | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/frontend/core/src/components/affine/affine-error-boundary/error-basic/error-detail.tsx b/packages/frontend/core/src/components/affine/affine-error-boundary/error-basic/error-detail.tsx index c2a8c2ad0c269..43a9547a441c1 100644 --- a/packages/frontend/core/src/components/affine/affine-error-boundary/error-basic/error-detail.tsx +++ b/packages/frontend/core/src/components/affine/affine-error-boundary/error-basic/error-detail.tsx @@ -113,7 +113,11 @@ export const ErrorDetail: FC = props => { className={styles.actionButton} >
- {t['com.affine.error.hide-error']()} + + {showStack + ? t['com.affine.error.hide-error']() + : t['com.affine.error.show-error']()} +