mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-07 14:18:47 +00:00
Add setting to hide widgets on failure
This commit is contained in:
parent
3d654e03c6
commit
bd1c2b1881
84 changed files with 103 additions and 93 deletions
|
@ -9,12 +9,10 @@ function displayData(data) {
|
|||
return (data.type === 'Buffer') ? Buffer.from(data).toString() : JSON.stringify(data, 4);
|
||||
}
|
||||
|
||||
export default function Error({ error }) {
|
||||
export default function Error({ error: err }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
if (error?.data?.error) {
|
||||
error = error.data.error; // eslint-disable-line no-param-reassign
|
||||
}
|
||||
const { error } = err?.data ?? { error: err };
|
||||
|
||||
return (
|
||||
<details className="px-1 pb-1">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue