mirror of
https://github.com/tooot-app/app
synced 2025-02-24 23:57:44 +01:00
Fix account moved crash
When the account info was undefined, it may render fewer hooks
This commit is contained in:
parent
927e7df4e9
commit
ac293f28c1
@ -5,8 +5,7 @@ import { useNavigation } from '@react-navigation/native'
|
||||
import { useRelationshipQuery } from '@utils/queryHooks/relationship'
|
||||
import {
|
||||
getInstanceAccount,
|
||||
getInstancePush,
|
||||
getInstanceUri
|
||||
getInstancePush
|
||||
} from '@utils/slices/instancesSlice'
|
||||
import { StyleConstants } from '@utils/styles/constants'
|
||||
import React from 'react'
|
||||
@ -41,6 +40,10 @@ const Conversation = ({ account }: { account: Mastodon.Account }) => {
|
||||
}
|
||||
|
||||
const AccountInformationActions: React.FC<Props> = ({ account, myInfo }) => {
|
||||
if (!account) {
|
||||
return null
|
||||
}
|
||||
|
||||
const { t } = useTranslation('screenTabs')
|
||||
const navigation = useNavigation()
|
||||
|
||||
@ -65,7 +68,6 @@ const AccountInformationActions: React.FC<Props> = ({ account, myInfo }) => {
|
||||
getInstancePush,
|
||||
(prev, next) => prev?.global.value === next?.global.value
|
||||
)
|
||||
const instanceUri = useSelector(getInstanceUri)
|
||||
|
||||
if (myInfo) {
|
||||
return (
|
||||
|
Loading…
x
Reference in New Issue
Block a user