Migrating ModalWrapper to functional component
This commit is contained in:
parent
67916470fd
commit
df00c4613e
1 changed files with 8 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue