Fix conditional hook

Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
Émile Ré
2025-12-03 18:30:21 +04:00
parent 638bef05a2
commit 86ec5c5a3e

View File

@@ -87,7 +87,8 @@ export default function FormRiskDialog({
}: Props) { }: Props) {
const { __ } = useTranslate(); const { __ } = useTranslate();
const organizationId = useOrganizationId(); const organizationId = useOrganizationId();
const ref = refProps ?? useDialogRef(); const dialogRef = useDialogRef();
const ref = refProps ?? dialogRef;
const { control, handleSubmit, setValue, register, watch, formState, reset } = const { control, handleSubmit, setValue, register, watch, formState, reset } =
useRiskForm(risk); useRiskForm(risk);