refactor(frontend): resolve TS errors

This commit is contained in:
yassinedorbozgithub 2025-02-09 01:55:14 +01:00
parent 142ba1bde2
commit 27f36823cf
4 changed files with 3 additions and 8 deletions

View File

@ -32,7 +32,7 @@ export const FormDialog = ({
);
return (
<Dialog fullWidth {...rest}>
<Dialog open={!!rest?.open} fullWidth {...rest}>
<DialogTitle onClose={onCancel}>{title}</DialogTitle>
<DialogContent>{children}</DialogContent>
{dialogActions}

View File

@ -20,7 +20,7 @@ export const AttachmentViewerForm: FC<
ComponentFormProps<AttachmentViewerFormData>
> = ({ data, Wrapper = Fragment, WrapperProps }) => {
return (
<Wrapper open={!!WrapperProps?.open} {...WrapperProps}>
<Wrapper {...WrapperProps}>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
width="auto"

View File

@ -109,11 +109,7 @@ export const BlockEditForm: FC<ComponentFormProps<IBlock>> = ({
}, [block, reset]);
return (
<Wrapper
open={!!WrapperProps?.open}
onSubmit={handleSubmit(onSubmitForm)}
{...WrapperProps}
>
<Wrapper onSubmit={handleSubmit(onSubmitForm)} {...WrapperProps}>
<BlockFormProvider methods={methods} block={block || undefined}>
<ContentContainer>
<ContentItem display="flex" gap={5}>

View File

@ -39,7 +39,6 @@ export const BlockMoveForm: FC<ComponentFormProps<BlockMoveFormData>> = ({
return (
<Wrapper
open={!!WrapperProps?.open}
onSubmit={handleMove}
{...WrapperProps}
confirmButtonProps={{