import { View, Text } from "@tarojs/components";
import Metric from "@/features/trackSomething/components/Metric";
import { useDidShow, usePullDownRefresh, useShareAppMessage } from "@tarojs/taro";
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'
            }
        })
    }
    useDidShow(() => {
        global.updateTab(1)
    })

    usePullDownRefresh(() => {

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