import { View, Text, Image } from "@tarojs/components";
import './index_time.scss';
import { jumpPage } from "@/features/trackTimeDuration/hooks/Common";
import { getCommon, getDot } from "@/features/trackTimeDuration/hooks/RingData";
import Rings, { RingCommon, BgRing, CurrentDot } from "@/features/trackTimeDuration/components/Rings";
import { useEffect, useState } from "react";
import dayjs from "dayjs";
let LinearGradient, useActionSheet, useNavigation
if (process.env.TARO_ENV == 'rn') {
LinearGradient = require('react-native-linear-gradient').default
useActionSheet = require('@expo/react-native-action-sheet').useActionSheet
useNavigation = require("@react-navigation/native").useNavigation
}
export default function IndexTimePage() {
let navigation;
if (useNavigation) {
navigation = useNavigation()
}
const [count, setCount] = useState(0)
useEffect(() => {
setInterval(() => {
setCount(t => t + 1)
}, 1000)
}, [])
function chooseLocation() {
jumpPage('', 'map', navigation)
}
const common: RingCommon = {
useCase: 'ChooseScenario',
radius: 115,
lineWidth: 26,
isFast: true,
status: 'WAIT_FOR_START'
}
const bgRing: BgRing = {
color: '#EAE9E9'
}
function ring() {
const currentDot: CurrentDot = {
color: '#CACACA',
lineWidth: 10,
borderColor: '#ffffff',
offset: 0
}
// var common = getCommon(null, true)
// common.radius = 115;
// common.lineWidth = 26;
// var bgRing = getBgRing()
// var realRing = getReal(record, false, false)
// return
return
}
return
{
ring()
}
{dayjs().format('HH:mm:ss')}
{dayjs().format('dddd, MMM DD')}
Beijing
UTC+8
Pick Location
English
}