index.tsx 685 B

123456789101112131415161718192021222324
  1. import React from 'react'
  2. import styles from './index.module.scss'
  3. import { useHistory } from 'react-router-dom'
  4. function A5Mobile({ show, setShow }: { show: boolean; setShow: (show: boolean) => void }) {
  5. const history = useHistory()
  6. return (
  7. <div className={styles.A5Mobile} style={{ display: show ? 'block' : 'none' }}>
  8. <div
  9. className='button'
  10. onClick={() => {
  11. setShow(false)
  12. history.push('/home?m=SG-hDFyy3xb7ri-04')
  13. window.location.reload()
  14. }}
  15. >
  16. <img src={require('./image/button.png')} alt='' />
  17. </div>
  18. </div>
  19. )
  20. }
  21. const MemoA5Mobile = React.memo(A5Mobile)
  22. export default MemoA5Mobile