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

@ -12,7 +12,7 @@ import {
DropdownMenuTrigger
} from "@app/components/ui/dropdown-menu";
import { useEnvContext } from "@app/hooks/useEnvContext";
import { useToast } from "@app/hooks/useToast";
import { toast } from "@app/hooks/useToast";
import { formatAxiosError } from "@app/lib/api";;
import { Laptop, LogOut, Moon, Sun } from "lucide-react";
import { useTheme } from "next-themes";
@ -23,7 +23,6 @@ import Disable2FaForm from "./Disable2FaForm";
import Enable2FaForm from "./Enable2FaForm";
export default function ProfileIcon() {
const { toast } = useToast();
const { setTheme, theme } = useTheme();
const { env } = useEnvContext();
const api = createApiClient({ env });