chore: carify Pomade login errors with actionable invalid vs network messaging

This commit is contained in:
2026-04-18 03:41:40 +05:45
parent 56edad77a8
commit d0b8b581cd
6 changed files with 66 additions and 9 deletions
+11
View File
@@ -0,0 +1,11 @@
export const POMADE_INVALID_LOGIN_MESSAGE = "Invalid login information"
export const POMADE_NETWORK_ERROR_MESSAGE = "Network error, please try again"
type PomadeMessage = {
res?: unknown
}
export const getPomadeLoginFailureMessage = (messages: PomadeMessage[]) =>
messages.some(message => message.res !== undefined)
? POMADE_INVALID_LOGIN_MESSAGE
: POMADE_NETWORK_ERROR_MESSAGE