index.tsx 619 B

1234567891011121314151617181920212223242526
  1. import React from 'react'
  2. import styles from './index.module.scss'
  3. import history from '@/utils/history'
  4. type Props = {
  5. unityId?: '1' | '2'
  6. }
  7. function FloorBtn({ unityId }: Props) {
  8. return (
  9. <div className={styles.FloorBtn}>
  10. <div
  11. className='FloorBtn1'
  12. hidden={!unityId}
  13. title='漫游模式'
  14. onClick={() => history.push(`/unity/${unityId}`)}
  15. ></div>
  16. {/* 更多 跳新页面 */}
  17. <div title='更多' className='FloorBtn2' onClick={() => history.push('/more')}></div>
  18. </div>
  19. )
  20. }
  21. const MemoFloorBtn = React.memo(FloorBtn)
  22. export default MemoFloorBtn