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 ( return (
<Dialog fullWidth {...rest}> <Dialog open={!!rest?.open} fullWidth {...rest}>
<DialogTitle onClose={onCancel}>{title}</DialogTitle> <DialogTitle onClose={onCancel}>{title}</DialogTitle>
<DialogContent>{children}</DialogContent> <DialogContent>{children}</DialogContent>
{dialogActions} {dialogActions}

View File

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

View File

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

View File

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