quivr/frontend/shared/SaveButton.tsx
ChloeMouret d7a508acdd
feat: add 2 save buttons on Brain management tab (#1039)
* add 2 save buttons

* use translation
2023-08-25 18:37:56 +02:00

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>
);
};