Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Updated ErrorDetail component to conditionally display "Hide error" or "Show error" based on the stack trace visibility. #9575

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ export const ErrorDetail: FC<ErrorDetailProps> = props => {
className={styles.actionButton}
>
<div className={styles.actionContent}>
<span>{t['com.affine.error.hide-error']()}</span>
<span>
{showStack
? t['com.affine.error.hide-error']()
: t['com.affine.error.show-error']()}
</span>
<ArrowDownSmallIcon
data-show-stack={showStack}
className={styles.arrowIcon}
Expand Down
3 changes: 2 additions & 1 deletion packages/frontend/i18n/src/resources/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@
"com.affine.enableAffineCloudModal.custom-server.description": "Choose an instance.",
"com.affine.enableAffineCloudModal.custom-server.enable": "Enable Cloud",
"com.affine.error.hide-error": "Hide error",
"com.affine.error.show-error": "Show error",
"com.affine.error.no-page-root.title": "Doc content is missing",
"com.affine.error.refetch": "Refetch",
"com.affine.error.reload": "Reload AFFiNE",
Expand Down Expand Up @@ -1619,4 +1620,4 @@
"com.affine.payment.sync-paused.member.member.description": "This workspace has reached its maximum member capacity and synchronization has been paused. Please contact your workspace owner to either adjust team membership or upgrade the plan to resume syncing.",
"com.affine.payment.sync-paused.member.member.confirm": "Got It",
"com.affine.server.delete": "Delete Server"
}
}
Loading