Migrating ModalWrapper to functional component

This commit is contained in:
Jesús Espino 2021-03-26 16:33:39 +01:00
parent 67916470fd
commit df00c4613e

View file

@ -4,16 +4,15 @@ import React from 'react'
import './modalWrapper.scss'
type Props = {
children: React.ReactNode
}
class ModalWrapper extends React.PureComponent<Props> {
render(): JSX.Element {
return (
<div className='ModalWrapper'>
{this.props.children}
</div>
)
}
}
const ModalWrapper = React.memo((props: Props) => {
return (
<div className='ModalWrapper'>
{props.children}
</div>
)
})
export default ModalWrapper