Skip to content

Commit

Permalink
refactor(botonic-react): props.coverComponent.props is not required
Browse files Browse the repository at this point in the history
  • Loading branch information
Iru89 committed Nov 18, 2024
1 parent 118bff0 commit cbf3e7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/botonic-react/src/webchat/webchat.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ export const Webchat = forwardRef((props, ref) => {
)
}
const coverComponent = getCoverComponent()
const coverComponentProps = props.coverComponent?.props

useEffect(() => {
if (!coverComponent) return
Expand Down Expand Up @@ -730,7 +731,7 @@ export const Webchat = forwardRef((props, ref) => {
{webchatState.isCoverComponentOpen ? (
<CoverComponent
component={coverComponent}
componentProps={props.coverComponent.props}
componentProps={coverComponentProps}
/>
) : (
<>
Expand Down

0 comments on commit cbf3e7b

Please sign in to comment.