import { View, Text } from "@tarojs/components";
import Metric from "@/features/trackSomething/components/Metric";
import { useDidShow, usePullDownRefresh, useShareAppMessage } from "@tarojs/taro";
import Tabbar from "@/components/navigation/TabBar";
import { useTranslation } from "react-i18next";

export default function Page() {
    const { t } = useTranslation()
    if (process.env.TARO_ENV == 'weapp') {
        useShareAppMessage((e) => {
            return {
                title: t('share.title'),
                path: 'pages/clock/Clock'
            }
        })
    }

    usePullDownRefresh(() => {

        global.refreshMetric()
    })
    return <View className="container">
        <Metric />
        <Tabbar index={1}/>
    </View>
}