Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5fd9c8 commit 30ced2fCopy full SHA for 30ced2f
site/src/components/ErrorSummary/index.tsx
@@ -1,5 +1,9 @@
1
import React from "react"
2
3
+const Language = {
4
+ unknownErrorMessage: "Unknown error"
5
+}
6
+
7
export interface ErrorSummaryProps {
8
error: Error | unknown
9
}
@@ -8,8 +12,8 @@ export const ErrorSummary: React.FC<ErrorSummaryProps> = ({ error }) => {
12
// TODO: More interesting error page
13
10
14
if (!(error instanceof Error)) {
11
- return <div>{"Unknown error"}</div>
15
+ return <div>{Language.unknownErrorMessage}</div>
16
+ } else {
17
+ return <div>{error.toString()}</div>
18
-
- return <div>{error.toString()}</div>
19
0 commit comments