-
Notifications
You must be signed in to change notification settings - Fork 0
Update RoomSettingModal.js #51
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
React Fragment is used to group multiple elements together without having to add extra nodes to the DOM ( https://reactjs.org/docs/fragments.html ) . Right now , you are using this incorrectly because React.Fragment doesn't take these props ( you probably want to do this with a Modal ). Change React.Fragment to Modal to change components.
@@ -84,7 +85,10 @@ export const RoomSettingModal = (props) => { | |||
} | |||
|
|||
return ( | |||
<React.Fragment> | |||
<React.Fragment onHide={props.onHide} show={props.show}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change React.Fragment to Modal to use the Modal component instead.
@@ -84,7 +85,10 @@ export const RoomSettingModal = (props) => { | |||
} | |||
|
|||
return ( | |||
<React.Fragment> | |||
<React.Fragment onHide={props.onHide} show={props.show}> | |||
<Modal.Header closeButton> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use self closing tags if there is no content inside the component. <Modal.Header closeButton/>
Make sure the RoomSettingModal component is getting passed the props that is needed to use the Modal or else it won't work. |
I tried to add a close button for RoomSettings Form.