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

@ -28,7 +28,7 @@ import {
CredenzaHeader,
CredenzaTitle
} from "@app/components/Credenza";
import { useToast } from "@app/hooks/useToast";
import { toast } from "@app/hooks/useToast";
import { formatAxiosError } from "@app/lib/api";;
import { useUserContext } from "@app/hooks/useUserContext";
import { InputOTP, InputOTPGroup, InputOTPSlot } from "./ui/input-otp";
@ -50,8 +50,6 @@ export default function Disable2FaForm({ open, setOpen }: Disable2FaProps) {
const [step, setStep] = useState<"password" | "success">("password");
const { toast } = useToast();
const { user, updateUser } = useUserContext();
const api = createApiClient(useEnvContext());