ldc-ovoteam/resources/ts/back/Components/Inputs/SimpleVimeoId.tsx
Jérémy Munsch cd2d8ed397
refactor(i18n): replace GetTranslation with trans function
- Updated translation utility to improve consistency and reduce redundancy.
- Removed deprecated useTrans hook and related code.
- Introduced a new Zustand store for managing translations and locale settings.
- Cleaned up unused hooks and files related to localization.
2026-10-19 17:43:33 +02:00

23 lines
683 B
TypeScript

import SimpleString from "@/back/Components/Inputs/SimpleString";
import str from "@/hooks/use-string";
import trans from "@/hooks/use-translations";
interface SimpleVimeoIdProps {
className?: string;
name: string;
value?: string;
id?: string;
required?: boolean;
disabled?: boolean;
parentErrors?: Record<string, string> | null;
setData: (name: string, value: string) => void;
}
export default function SimpleVimeoId(props: Readonly<SimpleVimeoIdProps>) {
const pattern = "^[0-9]{8,10}$";
const label = str(trans("uwil-backend::validation.custom.vimeo_id"))
.ucFirst()
.value();
return <SimpleString pattern={pattern} label={label} {...props} />;
}