32 lines
672 B
TypeScript
32 lines
672 B
TypeScript
import { FormDialog } from "@repo/shadcn-ui/components/form-dialog";
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
import { PasswordForm } from "./password-form";
|
|
|
|
export function AccountPasswordDialog({
|
|
open,
|
|
csrfToken,
|
|
onClose,
|
|
}: {
|
|
open: boolean;
|
|
csrfToken: string;
|
|
onClose: () => void;
|
|
}) {
|
|
const { t } = useTranslation("identity");
|
|
return (
|
|
<FormDialog
|
|
cancelLabel={t("cancel")}
|
|
formActions
|
|
onOpenChange={(value) => {
|
|
if (!value) {
|
|
onClose();
|
|
}
|
|
}}
|
|
open={open}
|
|
title={t("changePassword")}
|
|
>
|
|
<PasswordForm csrfToken={csrfToken} showTitle={false} />
|
|
</FormDialog>
|
|
);
|
|
}
|