import React from 'react'
import styles from './index.module.scss'
import history from '@/utils/history'

type Props = {
  unityId?: '1' | '2'
}

function FloorBtn({ unityId }: Props) {
  return (
    <div className={styles.FloorBtn}>
      <div
        className='FloorBtn1'
        hidden={!unityId}
        title='漫游模式'
        onClick={() => history.push(`/unity/${unityId}`)}
      ></div>
      {/* 更多 跳新页面 */}
      <div title='更多' className='FloorBtn2' onClick={() => history.push('/more')}></div>
    </div>
  )
}

const MemoFloorBtn = React.memo(FloorBtn)

export default MemoFloorBtn
