Use chrome.i18n.getMessage
within ErrorRenderer
This commit is contained in:
parent
928ffa6d05
commit
34e70f12ed
2 changed files with 5 additions and 1 deletions
|
@ -22,5 +22,8 @@
|
|||
},
|
||||
"no": {
|
||||
"message": "No"
|
||||
},
|
||||
"error": {
|
||||
"message": "Error"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import React from "react";
|
||||
|
||||
export function ErrorRenderer({ error }: {error: Error}) {
|
||||
const t = chrome.i18n.getMessage;
|
||||
return (
|
||||
<div className="error">
|
||||
<span>Error</span>:
|
||||
<span>{t("error")}</span>:
|
||||
<span> {error.message}</span>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue