import { useState } from "react"; import { useLocale } from "@lib/hooks/useLocale"; import Badge from "@components/ui/Badge"; import Button from "@components/ui/Button"; import DisableTwoFactorModal from "./DisableTwoFactorModal"; import EnableTwoFactorModal from "./EnableTwoFactorModal"; const TwoFactorAuthSection = ({ twoFactorEnabled, localeProp, }: { twoFactorEnabled: boolean; localeProp: string; }) => { const [enabled, setEnabled] = useState(twoFactorEnabled); const [enableModalOpen, setEnableModalOpen] = useState(false); const [disableModalOpen, setDisableModalOpen] = useState(false); const { t, locale } = useLocale({ localeProp }); return ( <>
{t("add_an_extra_layer_of_security")}
{enableModalOpen && (