mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-01 01:24:51 +02:00
fix toast dismiss causing components to rerender and clean up rules text
This commit is contained in:
parent
6fba13c8d1
commit
8165051dd8
26 changed files with 69 additions and 83 deletions
|
@ -35,7 +35,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 CopyTextBox from "@app/components/CopyTextBox";
|
||||
import { QRCodeCanvas, QRCodeSVG } from "qrcode.react";
|
||||
|
@ -64,8 +64,6 @@ export default function Enable2FaForm({ open, setOpen }: Enable2FaProps) {
|
|||
const [loading, setLoading] = useState(false);
|
||||
const [backupCodes, setBackupCodes] = useState<string[]>([]);
|
||||
|
||||
const { toast } = useToast();
|
||||
|
||||
const { user, updateUser } = useUserContext();
|
||||
|
||||
const api = createApiClient(useEnvContext());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue