ldc-ovoteam/resources/ts/back/Components/SubmitButton.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

27 lines
685 B
TypeScript

// * Other
import BtnOptionnalLinkWithTooltip from "@/back/Components/BtnOptionnalLinkWithTooltip";
import str from "@/hooks/use-string";
import trans from "@/hooks/use-translations";
function SubmitButton({
isInDialog = false,
modelTrans,
}: Readonly<{
isInDialog?: boolean;
modelTrans: string;
}>) {
return (
<BtnOptionnalLinkWithTooltip
content={str(trans("uwil-backend::crud.actions.save")).ucFirst().value()}
tooltipContent={trans("uwil-backend::crud.helpers.save_model", {
params: {
model: modelTrans,
},
})}
type={isInDialog ? "button" : "submit"}
size="default"
/>
);
}
export default SubmitButton;