import ComponentInstance from '@components/Instance' import { useScrollToTop } from '@react-navigation/native' import Collections from '@screens/Tabs/Me/Root/Collections' import Logout from '@screens/Tabs/Me/Root/Logout' import MyInfo from '@screens/Tabs/Me/Root/MyInfo' import Settings from '@screens/Tabs/Me/Root/Settings' import AccountInformationSwitch from '@screens/Tabs/Me/Root/Switch' import AccountContext from '@screens/Tabs/Shared/Account/Context' import AccountNav from '@screens/Tabs/Shared/Account/Nav' import { useProfileQuery } from '@utils/queryHooks/profile' import { useGlobalStorage } from '@utils/storage/actions' import { StyleConstants } from '@utils/styles/constants' import React, { useRef } from 'react' import { View } from 'react-native' import Animated, { useAnimatedScrollHandler, useSharedValue } from 'react-native-reanimated' const TabMeRoot: React.FC = () => { const [accountActive] = useGlobalStorage.string('account.active') const { data } = useProfileQuery({ options: { enabled: !!accountActive, keepPreviousData: false } }) const scrollRef = useRef(null) useScrollToTop(scrollRef) const scrollY = useSharedValue(0) const onScroll = useAnimatedScrollHandler(event => { scrollY.value = event.contentOffset.y }) return ( {accountActive && data ? : null} {accountActive ? : } {accountActive ? : null} {accountActive ? ( ) : null} ) } export default TabMeRoot