Update kcContext.ts

Fix param according to description here 0a0f90aa2e/src/account/kcContext/KcContext.ts (L64)
This commit is contained in:
Paulo 2023-12-09 14:32:55 -05:00 committed by GitHub
parent bd3f07b601
commit 18d122e1e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,9 +79,9 @@ export const { getKcContext } = createGetKcContext<KcContextExtension>({
"*.example.com",
"hello-world.com"
],
// Simulate we got an error with the email field
// Simulate we got an error with the email field. Return text if message for given field exists.
messagesPerField: {
printIfExists: <T>(fieldName: string, className: T) => { console.log({ fieldName }); return fieldName === "email" ? className : undefined; },
printIfExists: <T>(fieldName: string, text: T) => { console.log({ fieldName }); return fieldName === "email" ? text : undefined; },
existsError: (fieldName: string) => fieldName === "email",
get: (fieldName: string) => `Fake error for ${fieldName}`,
exists: (fieldName: string) => fieldName === "email"