refactor: remove z.config(z.locales.it()) from multiple form components and update chat import paths
This commit is contained in:
parent
60e4b187bf
commit
984b1d7ae5
13 changed files with 3 additions and 28 deletions
|
|
@ -55,9 +55,6 @@ export const FormBanlist = ({
|
|||
...initialValues,
|
||||
};
|
||||
}
|
||||
|
||||
z.config(z.locales.it());
|
||||
|
||||
const form = useZodForm(Schema, {
|
||||
defaultValues: defaultValues,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -74,8 +74,6 @@ export const FormBanners = ({
|
|||
};
|
||||
}
|
||||
|
||||
z.config(z.locales.it());
|
||||
|
||||
const form = useZodForm(Schema, {
|
||||
defaultValues: defaultValues,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -66,8 +66,6 @@ export const FormEditOrder = ({ prezziario, data, close }: FormProps) => {
|
|||
});
|
||||
type FormValues = z.infer<typeof schema>;
|
||||
|
||||
z.config(z.locales.it());
|
||||
|
||||
const form = useZodForm(schema, {
|
||||
defaultValues: {
|
||||
...data,
|
||||
|
|
|
|||
|
|
@ -51,8 +51,6 @@ export const FormEtichette = ({
|
|||
};
|
||||
}
|
||||
|
||||
z.config(z.locales.it());
|
||||
|
||||
const form = useZodForm(Schema, {
|
||||
defaultValues: defaultValues,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -43,8 +43,6 @@ export const FormFlags = ({
|
|||
};
|
||||
}
|
||||
|
||||
z.config(z.locales.it());
|
||||
|
||||
const form = useZodForm(Schema, {
|
||||
defaultValues: defaultValues,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ export const MustChangePasswordForm = ({
|
|||
|
||||
type FormValues = z.infer<typeof schema>;
|
||||
|
||||
z.config(z.locales.it());
|
||||
|
||||
const form = useZodForm(schema, {
|
||||
defaultValues: {
|
||||
mustChangePassword,
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@ const Schema = z
|
|||
});
|
||||
type FormValues = z.infer<typeof Schema>;
|
||||
export const FormAddCodaEmail = ({ submitMutation }: FormProps) => {
|
||||
z.config(z.locales.it());
|
||||
const now = new Date();
|
||||
const form = useZodForm(Schema, {
|
||||
defaultValues: {
|
||||
|
|
|
|||
|
|
@ -71,8 +71,6 @@ export const FormNewOrder = ({
|
|||
});
|
||||
type FormValues = z.infer<typeof schema>;
|
||||
|
||||
z.config(z.locales.it());
|
||||
|
||||
const form = useZodForm(schema, {
|
||||
defaultValues: {
|
||||
sconto: 0,
|
||||
|
|
|
|||
|
|
@ -94,8 +94,6 @@ export const FormPrezzo = ({
|
|||
service_variant: null,
|
||||
};
|
||||
|
||||
z.config(z.locales.it());
|
||||
|
||||
const form = useZodForm(PrezzoSchema, {
|
||||
defaultValues: defaultValues,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -47,8 +47,6 @@ export const FormStringhe = ({
|
|||
};
|
||||
}
|
||||
|
||||
z.config(z.locales.it());
|
||||
|
||||
const form = useZodForm(Schema, {
|
||||
defaultValues: defaultValues,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import type { GetServerSideProps } from "next";
|
|||
import Head from "next/head";
|
||||
import { useState } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
import z from "zod";
|
||||
import type z from "zod";
|
||||
import { Confirm } from "~/components/confirm";
|
||||
import {
|
||||
Form,
|
||||
|
|
@ -311,8 +311,6 @@ const FormComuni = ({
|
|||
defaultValues = initialValues;
|
||||
}
|
||||
|
||||
z.config(z.locales.it());
|
||||
|
||||
const form = useZodForm(Schema, {
|
||||
defaultValues: defaultValues,
|
||||
});
|
||||
|
|
@ -626,8 +624,6 @@ const FormProvincie = ({
|
|||
defaultValues = initialValues;
|
||||
}
|
||||
|
||||
z.config(z.locales.it());
|
||||
|
||||
const form = useZodForm(Schema, {
|
||||
defaultValues: defaultValues,
|
||||
});
|
||||
|
|
@ -914,8 +910,6 @@ const FormNazioni = ({
|
|||
defaultValues = initialValues;
|
||||
}
|
||||
|
||||
z.config(z.locales.it());
|
||||
|
||||
const form = useZodForm(Schema, {
|
||||
defaultValues: defaultValues,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import {
|
|||
MessageUpdateEventSchema,
|
||||
SidebarUpdateSchema,
|
||||
TypingDataSchema,
|
||||
} from "~/server/utils/zod_chat_types";
|
||||
} from "~/server/utils/zod_utils";
|
||||
import { getKeydbClient, getSubClient } from "~/utils/keydb";
|
||||
import { withUserColorStr } from "~/utils/kysely-helper";
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { chatsChatid } from "~/schemas/public/Chats";
|
|||
import { MessagesSchema, messagesMessageid } from "~/schemas/public/Messages";
|
||||
import { usersId } from "~/schemas/public/Users";
|
||||
|
||||
z.config(z.locales.it());
|
||||
export const MessageDataSchema = MessagesSchema.omit({
|
||||
time: true,
|
||||
}).extend({
|
||||
Loading…
Add table
Reference in a new issue