Use chrome.i18n.getMessage within ErrorRenderer

This commit is contained in:
0x1eef 2023-09-28 13:56:05 -03:00
parent 928ffa6d05
commit 34e70f12ed
2 changed files with 5 additions and 1 deletions

View file

@ -22,5 +22,8 @@
}, },
"no": { "no": {
"message": "No" "message": "No"
},
"error": {
"message": "Error"
} }
} }

View file

@ -1,9 +1,10 @@
import React from "react"; import React from "react";
export function ErrorRenderer({ error }: {error: Error}) { export function ErrorRenderer({ error }: {error: Error}) {
const t = chrome.i18n.getMessage;
return ( return (
<div className="error"> <div className="error">
<span>Error</span>: <span>{t("error")}</span>:
<span>&nbsp;{error.message}</span> <span>&nbsp;{error.message}</span>
</div> </div>
); );