update all

This commit is contained in:
Lokowitz
2025-05-25 19:01:20 +00:00
parent ea24759bb3
commit f07e8d08c3
63 changed files with 380 additions and 381 deletions

View File

@@ -9,7 +9,7 @@ import {
InfoSections,
InfoSectionTitle
} from "@app/components/InfoSection";
import { useTranslations } from 'next-intl';
import { useTranslations } from "next-intl";
type SiteInfoCardProps = {};

View File

@@ -31,13 +31,7 @@ import { formatAxiosError } from "@app/lib/api";
import { createApiClient } from "@app/lib/api";
import { useEnvContext } from "@app/hooks/useEnvContext";
import { useState } from "react";
import { useTranslations } from 'next-intl';
const GeneralFormSchema = z.object({
name: z.string().nonempty("Name is required")
});
type GeneralFormValues = z.infer<typeof GeneralFormSchema>;
import { useTranslations } from "next-intl";
export default function GeneralPage() {
const { site, updateSite } = useSiteContext();
@@ -47,6 +41,13 @@ export default function GeneralPage() {
const [loading, setLoading] = useState(false);
const router = useRouter();
const t = useTranslations();
const GeneralFormSchema = z.object({
name: z.string().nonempty(t('nameRequired'))
});
type GeneralFormValues = z.infer<typeof GeneralFormSchema>;
const form = useForm<GeneralFormValues>({
resolver: zodResolver(GeneralFormSchema),
@@ -55,7 +56,6 @@ export default function GeneralPage() {
},
mode: "onChange"
});
const t = useTranslations();
async function onSubmit(data: GeneralFormValues) {
setLoading(true);

View File

@@ -16,7 +16,7 @@ import {
BreadcrumbSeparator
} from "@app/components/ui/breadcrumb";
import SiteInfoCard from "./SiteInfoCard";
import { getTranslations } from 'next-intl/server';
import { getTranslations } from "next-intl/server";
interface SettingsLayoutProps {
children: React.ReactNode;