refactor(frontend): resolve TS errors

This commit is contained in:
yassinedorbozgithub 2025-02-09 01:48:14 +01:00
parent 90a7c55646
commit 9190ec9864
3 changed files with 7 additions and 2 deletions

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 {...WrapperProps}> <Wrapper open={!!WrapperProps?.open} {...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,7 +109,11 @@ export const BlockEditForm: FC<ComponentFormProps<IBlock>> = ({
}, [block, reset]); }, [block, reset]);
return ( return (
<Wrapper onSubmit={handleSubmit(onSubmitForm)} {...WrapperProps}> <Wrapper
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,6 +39,7 @@ export const BlockMoveForm: FC<ComponentFormProps<BlockMoveFormData>> = ({
return ( return (
<Wrapper <Wrapper
open={!!WrapperProps?.open}
onSubmit={handleMove} onSubmit={handleMove}
{...WrapperProps} {...WrapperProps}
confirmButtonProps={{ confirmButtonProps={{