fix toast dismiss causing components to rerender and clean up rules text

This commit is contained in:
Milo Schwartz 2025-02-10 21:35:06 -05:00
parent 6fba13c8d1
commit 8165051dd8
No known key found for this signature in database
26 changed files with 69 additions and 83 deletions

View file

@ -31,7 +31,7 @@ import { AxiosResponse } from "axios";
import { VerifyEmailResponse } from "@server/routers/auth";
import { Loader2 } from "lucide-react";
import { Alert, AlertDescription } from "../../../components/ui/alert";
import { useToast } from "@app/hooks/useToast";
import { toast } from "@app/hooks/useToast";
import { useRouter } from "next/navigation";
import { formatAxiosError } from "@app/lib/api";;
import { createApiClient } from "@app/lib/api";
@ -61,8 +61,6 @@ export default function VerifyEmailForm({
const [isResending, setIsResending] = useState(false);
const [isSubmitting, setIsSubmitting] = useState(false);
const { toast } = useToast();
const api = createApiClient(useEnvContext());
const form = useForm<z.infer<typeof FormSchema>>({