import React, {useEffect, useRef, useState} from 'react'; import {Dimensions, Image, View} from 'react-native'; import Animated, {Easing, timing, useValue} from 'react-native-reanimated'; import {SafeAreaView} from 'react-native-safe-area-context'; import {useTracked} from '../../provider'; import {useSettingStore} from '../../provider/stores'; import {dHeight, getElevation} from '../../utils'; import {MMKV} from '../../utils/mmkv'; import {SIZE} from '../../utils/SizeUtils'; import {sleep} from '../../utils/TimeUtils'; import umami from '../../utils/umami'; import {Button} from '../Button'; import {SvgToPngView} from '../ListPlaceholders'; import MovableView from '../Transitions/movableview'; import Heading from '../Typography/Heading'; import Paragraph from '../Typography/Paragraph'; let SVG_D = ``; const SVG_Z = ``; const SplashScreen = () => { const [state] = useTracked(); const {colors} = state; const isIntroCompleted = false; //useSettingStore(state => state.isIntroCompleted); const setIntroCompleted = useSettingStore(state => state.setIntroCompleted); const opacity = useValue(0); const translateY = useValue(20); const translateY2 = useValue(0); useEffect(() => { if (!isIntroCompleted) { umami.pageView('/welcome', '', []); setTimeout(() => { timing(opacity, { toValue: 1, duration: 300, easing: Easing.in(Easing.ease) }).start(); timing(translateY, { toValue: 0, duration: 500, easing: Easing.in(Easing.ease) }).start(); }, 15); } }, [isIntroCompleted]); const hide = async () => { timing(translateY2, { toValue: dHeight * 2, duration: 500, easing: Easing.in(Easing.ease) }).start(); await sleep(500); setIntroCompleted(true); }; return ( !isIntroCompleted && ( Safe & encrypted notes {`Write with freedom.\nNever compromise on\nprivacy again.`}