mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-26 05:16:41 +07:00
99 use swr (#100)
* 99: made node use SWR * 99: fixed comments for SWR node * 99: added error toast to useNodeFormFormik.ts
This commit is contained in:
parent
832386d39a
commit
c2d1c2bfc9
35 changed files with 366 additions and 413 deletions
9
src/utils/errors/showToast.ts
Normal file
9
src/utils/errors/showToast.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
export const showErrorToast = (error: unknown) => {
|
||||
if (!(error instanceof Error)) {
|
||||
console.warn('catched strange exception', error);
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: show toast or something
|
||||
console.warn(error.message);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue