mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-12 11:26:07 +03:00
1593c3342c
* feat: update GET/brains return status * feat: add public tag on brain list * feat: add public tag for public brain on brain settings tab * feat: hide over tab when brain access is public
23 lines
572 B
TypeScript
23 lines
572 B
TypeScript
import { ReactElement } from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
import Button from "@/lib/components/ui/Button";
|
|
|
|
interface Props extends React.ComponentProps<typeof Button> {
|
|
handleSubmit: (checkDirty: boolean) => Promise<void>;
|
|
}
|
|
export const SaveButton = ({ handleSubmit, ...props }: Props): ReactElement => {
|
|
const { t } = useTranslation(["translation"]);
|
|
|
|
return (
|
|
<Button
|
|
variant={"primary"}
|
|
onClick={() => void handleSubmit(true)}
|
|
type="button"
|
|
{...props}
|
|
>
|
|
{t("saveButton")}
|
|
</Button>
|
|
);
|
|
};
|