import { View, Text, Switch, ScrollView } from "@tarojs/components"; import Metric from "@/features/trackSomething/components/Metric"; import { useDidShow, usePullDownRefresh, useShareAppMessage } from "@tarojs/taro"; import { useTranslation } from "react-i18next"; import Segment from '@/components/navigation/Segment' import { useEffect, useState } from "react"; import { kIsAndroid, rpxToPx } from "@/utils/tools"; import './setting.scss' export default function Page() { const { t } = useTranslation() const [segmentIndex, setSegmentIndex] = useState(0) useEffect(() => { checkSetting() }, []) function checkSetting() { console.log('notification setting begin') if (process.env.TARO_ENV == 'rn' && kIsAndroid) { var Jto = require('react-native').NativeModules.NativeBridge; Jto.getChannelStatus().then(result => { var data = JSON.parse(result); console.log('notification setting', data) }) } } function goSetting(){ if (process.env.TARO_ENV == 'rn' && kIsAndroid) { var Jto = require('react-native').NativeModules.NativeBridge; Jto.openNotificationSettings() } } function free() { return Fasting Reminders At your scheduled time On A timely reminder so you never miss your scheduled time for fasting. } function pro() { return Fasting with/or Sleep Reminders At my scheduled time Always A timely reminder so you never miss your scheduled time for fasting or sleep. Extra Reminders If I missed previous action In cases when you missed a previous action, you receive another reminder to log it together with the current action. This gives you extra protection against any streak loss. Follow the Sun (PRO) Reminders for Your Daily Local Sun Schedule Sunrise Sunset Solar Noon Note if live in polar region, during time of Polar Day (Midnight Sun) when the Sun is up all day and during time of Polar Night when the Sun is down all day, the only reminder available is for daily Solar Noon. } return {/* { setSegmentIndex(e); // global.segmentIndex = e // console.log('segment item click', e) }} /> */} { segmentIndex == 1 ? free() : pro() } { process.env.TARO_ENV=='rn' && kIsAndroid && Jump to App's Notifications settings{'>>'} } }