1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Persist storage working

This commit is contained in:
Zhiyuan Zheng
2020-11-21 13:32:29 +01:00
parent 40266b8ce3
commit 1ad67e67ac
7 changed files with 23 additions and 10 deletions

View File

@ -1,12 +1,15 @@
import React from 'react'
import { View } from 'react-native'
import store from 'src/store'
import { getLocalRegistered } from 'src/utils/slices/instancesSlice'
import { useSelector } from 'react-redux'
import { RootState } from 'src/store'
import Login from './Root/Login'
const ScreenMeRoot: React.FC = () => {
const localRegistered = getLocalRegistered(store.getState())
const localRegistered = useSelector(
(state: RootState) => state.instances.local.url
)
return <View>{localRegistered ? <></> : <Login />}</View>
}