mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Fix accounts array empty not init
This commit is contained in:
parent
30be3cdb15
commit
76d4bc754b
@ -184,7 +184,7 @@ const ComponentInstance: React.FC<Props> = ({
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (!account) {
|
if (!account) {
|
||||||
setGlobalStorage('accounts', accounts?.concat([accountKey]))
|
setGlobalStorage('accounts', (accounts || []).concat([accountKey]))
|
||||||
}
|
}
|
||||||
setAccount(accountKey)
|
setAccount(accountKey)
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@ import { useTranslation } from 'react-i18next'
|
|||||||
import { View } from 'react-native'
|
import { View } from 'react-native'
|
||||||
|
|
||||||
const ComposePostingAs = () => {
|
const ComposePostingAs = () => {
|
||||||
const accounts = useGlobalStorage.object('accounts')
|
const [accounts] = useGlobalStorage.object('accounts')
|
||||||
if (!accounts.length) return null
|
if (!accounts?.length) return null
|
||||||
|
|
||||||
const { t } = useTranslation('screenCompose')
|
const { t } = useTranslation('screenCompose')
|
||||||
const { colors } = useTheme()
|
const { colors } = useTheme()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user