♻️ refactor: Rename buildScheme to buildSchema and update imports in server form components

This commit is contained in:
web
2025-08-26 11:37:13 -07:00
parent 38dda842c0
commit ee98e7e513
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -56,7 +56,7 @@ async function getServers(): Promise<ServerRow[]> {
return (data?.data?.list || []) as ServerRow[];
}
const buildScheme = (t: ReturnType<typeof useTranslations>) =>
const buildSchema = (t: ReturnType<typeof useTranslations>) =>
z.object({
name: z.string().trim().min(1, t('errors.nameRequired')),
server_id: z.coerce
@@ -84,7 +84,7 @@ export default function NodeForm(props: {
}) {
const { trigger, title, loading, initialValues, onSubmit } = props;
const t = useTranslations('nodes');
const Scheme = useMemo(() => buildScheme(t), [t]);
const Scheme = useMemo(() => buildSchema(t), [t]);
const form = useForm<NodeFormValues>({
resolver: zodResolver(Scheme),