This commit is contained in:
parent
f4f80b3e57
commit
6e16e7b5fb
@ -1,3 +1,5 @@
|
|||||||
|
import { db } from "Db";
|
||||||
|
import AsyncButton from "Element/AsyncButton";
|
||||||
import { FormattedMessage } from "react-intl";
|
import { FormattedMessage } from "react-intl";
|
||||||
import { useRouteError } from "react-router-dom";
|
import { useRouteError } from "react-router-dom";
|
||||||
|
|
||||||
@ -6,12 +8,28 @@ const ErrorPage = () => {
|
|||||||
|
|
||||||
console.error(error);
|
console.error(error);
|
||||||
return (
|
return (
|
||||||
<>
|
<div className="main-content page">
|
||||||
<h4>
|
<h4>
|
||||||
<FormattedMessage defaultMessage="An error has occured!" />
|
<FormattedMessage defaultMessage="An error has occured!" />
|
||||||
</h4>
|
</h4>
|
||||||
<pre>{JSON.stringify(error, undefined, " ")}</pre>
|
<AsyncButton
|
||||||
</>
|
onClick={async () => {
|
||||||
|
await db.delete();
|
||||||
|
globalThis.localStorage.clear();
|
||||||
|
globalThis.location.href = "/";
|
||||||
|
}}>
|
||||||
|
<FormattedMessage defaultMessage="Clear cache and reload" />
|
||||||
|
</AsyncButton>
|
||||||
|
{
|
||||||
|
<pre>
|
||||||
|
{JSON.stringify(
|
||||||
|
error instanceof Error ? { name: error.name, message: error.message, stack: error.stack } : error,
|
||||||
|
undefined,
|
||||||
|
" "
|
||||||
|
)}
|
||||||
|
</pre>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -407,6 +407,9 @@
|
|||||||
"HOzFdo": {
|
"HOzFdo": {
|
||||||
"defaultMessage": "Muted"
|
"defaultMessage": "Muted"
|
||||||
},
|
},
|
||||||
|
"HWbkEK": {
|
||||||
|
"defaultMessage": "Clear cache and reload"
|
||||||
|
},
|
||||||
"HbefNb": {
|
"HbefNb": {
|
||||||
"defaultMessage": "Open Wallet"
|
"defaultMessage": "Open Wallet"
|
||||||
},
|
},
|
||||||
|
@ -133,6 +133,7 @@
|
|||||||
"HAlOn1": "Name",
|
"HAlOn1": "Name",
|
||||||
"HFls6j": "name will be available later",
|
"HFls6j": "name will be available later",
|
||||||
"HOzFdo": "Muted",
|
"HOzFdo": "Muted",
|
||||||
|
"HWbkEK": "Clear cache and reload",
|
||||||
"HbefNb": "Open Wallet",
|
"HbefNb": "Open Wallet",
|
||||||
"IDjHJ6": "Thanks for using Snort, please consider donating if you can.",
|
"IDjHJ6": "Thanks for using Snort, please consider donating if you can.",
|
||||||
"IEwZvs": "Are you sure you want to unpin this note?",
|
"IEwZvs": "Are you sure you want to unpin this note?",
|
||||||
|
Loading…
Reference in New Issue
Block a user