Files
web/apps/scandic-web/components/TempDesignSystem/Form/Checkbox/errors.ts
Chuma Mcphoy (We Ahead) 1b8688c7ee Merged in fix/LOY-105-correct-translation-for-signup-tc (pull request #2167)
fix(LOY-105): use existing translation for t&c text 

* fix(LOY-105): use existing translation for t&c text in signup


Approved-by: Christian Andolf
2025-05-20 14:53:23 +00:00

16 lines
454 B
TypeScript

import { signupErrors } from "@/components/Forms/Signup/schema"
import type { IntlShape } from "react-intl"
export function getErrorMessage(intl: IntlShape, errorCode?: string) {
switch (errorCode) {
case signupErrors.TERMS_REQUIRED:
return intl.formatMessage({
defaultMessage: "You must accept the terms and conditions",
})
default:
console.warn("Error code not supported:", errorCode)
return errorCode
}
}