- 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.
23 lines
683 B
TypeScript
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} />;
|
|
}
|