refactor: remove dynamic import of DevTool for cleaner code
This commit is contained in:
parent
95f0668d96
commit
8e9d34e61f
1 changed files with 0 additions and 7 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
import { differenceInYears, format } from "date-fns";
|
import { differenceInYears, format } from "date-fns";
|
||||||
import { enUS, it } from "date-fns/locale";
|
import { enUS, it } from "date-fns/locale";
|
||||||
import { CalendarIcon } from "lucide-react";
|
import { CalendarIcon } from "lucide-react";
|
||||||
import dynamic from "next/dynamic";
|
|
||||||
import { type Control, useWatch } from "react-hook-form";
|
import { type Control, useWatch } from "react-hook-form";
|
||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
import { z } from "zod/v4";
|
import { z } from "zod/v4";
|
||||||
|
|
@ -42,11 +41,6 @@ import { UsersAnagraficaSchema } from "~/schemas/public/UsersAnagrafica";
|
||||||
import type { CompleteUserData } from "~/server/services/user.service";
|
import type { CompleteUserData } from "~/server/services/user.service";
|
||||||
import { api } from "~/utils/api";
|
import { api } from "~/utils/api";
|
||||||
|
|
||||||
const DevT: React.ElementType = dynamic(
|
|
||||||
() => import("@hookform/devtools").then((module) => module.DevTool),
|
|
||||||
{ ssr: false },
|
|
||||||
);
|
|
||||||
|
|
||||||
const Schema = UsersAnagraficaSchema.omit({
|
const Schema = UsersAnagraficaSchema.omit({
|
||||||
idanagrafica: true,
|
idanagrafica: true,
|
||||||
userid: true,
|
userid: true,
|
||||||
|
|
@ -174,7 +168,6 @@ export const ProfileFormAnagrafica = ({
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Form {...form}>
|
<Form {...form}>
|
||||||
<DevT control={form.control} />
|
|
||||||
<form
|
<form
|
||||||
className="h-full space-y-8 px-0.5"
|
className="h-full space-y-8 px-0.5"
|
||||||
onSubmit={form.handleSubmit(onSubmit)}
|
onSubmit={form.handleSubmit(onSubmit)}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue