mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 17:43:03 +03:00
d7a508acdd
* add 2 save buttons * use translation
22 lines
501 B
TypeScript
22 lines
501 B
TypeScript
import { ReactElement } from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
import Button from "@/lib/components/ui/Button";
|
|
|
|
interface Props {
|
|
handleSubmit: (checkDirty: boolean) => Promise<void>;
|
|
}
|
|
export const SaveButton = ({ handleSubmit }: Props): ReactElement => {
|
|
const { t } = useTranslation(["translation"]);
|
|
|
|
return (
|
|
<Button
|
|
variant={"primary"}
|
|
onClick={() => void handleSubmit(true)}
|
|
type="button"
|
|
>
|
|
{t("saveButton")}
|
|
</Button>
|
|
);
|
|
};
|