mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-15 17:36:37 +00:00
I18n additionals (#125)
* New translation keys * Updates in src/components * Updates in src/providers * remove lable in selector, not needed --------- Co-authored-by: Lokowitz <marvinlokowitz@gmail.com>
This commit is contained in:
@@ -34,11 +34,6 @@ import { useUserContext } from "@app/hooks/useUserContext";
|
||||
import { CheckCircle2 } from "lucide-react";
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
const disableSchema = z.object({
|
||||
password: z.string().min(1, { message: "Password is required" }),
|
||||
code: z.string().min(1, { message: "Code is required" })
|
||||
});
|
||||
|
||||
type Disable2FaProps = {
|
||||
open: boolean;
|
||||
setOpen: (val: boolean) => void;
|
||||
@@ -53,6 +48,13 @@ export default function Disable2FaForm({ open, setOpen }: Disable2FaProps) {
|
||||
|
||||
const api = createApiClient(useEnvContext());
|
||||
|
||||
const t = useTranslations();
|
||||
|
||||
const disableSchema = z.object({
|
||||
password: z.string().min(1, { message: t('passwordRequired') }),
|
||||
code: z.string().min(1, { message: t('verificationCodeRequired') })
|
||||
});
|
||||
|
||||
const disableForm = useForm<z.infer<typeof disableSchema>>({
|
||||
resolver: zodResolver(disableSchema),
|
||||
defaultValues: {
|
||||
@@ -61,8 +63,6 @@ export default function Disable2FaForm({ open, setOpen }: Disable2FaProps) {
|
||||
}
|
||||
});
|
||||
|
||||
const t = useTranslations();
|
||||
|
||||
const request2fa = async (values: z.infer<typeof disableSchema>) => {
|
||||
setLoading(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user