mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-13 22:29:25 +02: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:
parent
dc6fafba41
commit
d768bb163a
16 changed files with 152 additions and 51 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue