Created
March 16, 2021 18:01
-
-
Save rasikag/0136d2bb76276ec5bd3b7fd15e4feaa6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// take out toErrorMap first | |
const errorMap = toErrorMap(response.data.changePassword.errors); | |
if ('token' in errorMap) { | |
// this is because we defined filed as token in user.ts in backend | |
setTokenError(errorMap.token) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment