import { View, Text } from '@tarojs/components'
import './index.scss'
import { useTranslation } from 'react-i18next'
import Taro from '@tarojs/taro'
import { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { changeTabbar } from '@/store/common'

export default function TabBar() {
    const { t } = useTranslation()
    const common = useSelector((state: any) => state.common);
    const [selIndex, setSelIndex] = useState(common.pageIndex)
    const dispatch = useDispatch();
    // useEffect(() => {
    //     console.log('aaa',global.index)
    //     setSelIndex(global.index?global.index:0)
    //   }, [global.index])
    // useEffect(()=>{
    //     console.log('page 初始化')
    // },[])

    useEffect(()=>{
        setSelIndex(common.pageIndex)
    },[common.pageIndex])

    
    return <View style={{width:0,height:0,opacity:0}}/>
}