- 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.
27 lines
685 B
TypeScript
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;
|