import { isEmptyObject } from '@/common/common'
import { Button, View } from '@tarojs/components'
import { FC, memo, useState } from 'react'
import IconFont from '../components/iconfont'
import styles from './index.module.scss'
const SonComp: FC = memo(() => {
  return <View className=''>我改变了吗{new Date().getTime()}</View>
})
// 用户信息
const UserInfo:FC = () => {
  return <View>
    sdfasdf
  </View>
}

// 我的
const User = () => {
  const obj = {}
  console.log(isEmptyObject(obj))
  const [count, setCount] = useState(0)
  const handleCount = () => {
    setCount((prev) => {
      return prev + 1
    })
  }
  return (
    <>
      <View className={styles['main']}>
        <UserInfo />
        sdfasdfasdf {count}
        <Button onClick={handleCount}>+1</Button>
        <SonComp />
        <IconFont name='icon-fahuoliebiao' />
      </View>
    </>
  )
}

export default User
