mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-28 14:16:41 +07:00
removed redux completely
This commit is contained in:
parent
26e6d8d41b
commit
a4bb07e9cf
323 changed files with 2464 additions and 3348 deletions
|
@ -1,7 +1,11 @@
|
|||
import { has, path } from 'ramda';
|
||||
import { ERROR_LITERAL, ERRORS } from '~/constants/errors';
|
||||
|
||||
export const getErrorMessage = (error: unknown) => {
|
||||
export const getErrorMessage = (error: unknown): string | undefined => {
|
||||
if (error === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (typeof error === 'string' && has(error, ERROR_LITERAL)) {
|
||||
return ERROR_LITERAL[error];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue