index.tsx 783 B

123456789101112131415161718192021222324252627
  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 className='title'>
  9. <img src={require('./image/title.png')} alt='' />
  10. </div>
  11. <div
  12. className='button'
  13. onClick={() => {
  14. setShow(false)
  15. history.push('/home?m=SG-56imSLC7Zli')
  16. window.location.reload()
  17. }}
  18. >
  19. <img src={require('./image/button.png')} alt='' />
  20. </div>
  21. </div>
  22. )
  23. }
  24. const MemoA5Mobile = React.memo(A5Mobile)
  25. export default MemoA5Mobile