fix: added parameter type for story context on register page

This commit is contained in:
Liam Lowsley-Williams 2024-10-08 16:50:11 -05:00
parent ecfdff5454
commit 94e2786297
No known key found for this signature in database
GPG Key ID: 4D8EB23F61E701D9

View File

@ -240,8 +240,8 @@ export const WithFieldErrors: Story = {
}
},
messagesPerField: {
existsError: fieldName => ["username", "email"].includes(fieldName),
get: fieldName => {
existsError: (fieldName: string) => ["username", "email"].includes(fieldName),
get: (fieldName: string) => {
if (fieldName === "username") return "Username is required.";
if (fieldName === "email") return "Invalid email format.";
}