mirror of
https://github.com/tooot-app/app
synced 2025-01-03 13:10:23 +01:00
Temp visual fix
This commit is contained in:
parent
1bcdc9fa93
commit
d1a737eb51
@ -22,12 +22,7 @@ const HeaderCenter: React.FC<Props> = ({
|
||||
const { colors } = useTheme()
|
||||
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center'
|
||||
}}
|
||||
>
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||
<CustomText
|
||||
style={{
|
||||
color: inverted ? colors.primaryOverlay : colors.primaryDefault
|
||||
@ -38,15 +33,13 @@ const HeaderCenter: React.FC<Props> = ({
|
||||
children={content}
|
||||
{...(onPress && { onPress })}
|
||||
/>
|
||||
{dropdown ? (
|
||||
<Icon
|
||||
name='ChevronDown'
|
||||
size={StyleConstants.Font.Size.M}
|
||||
color={colors.primaryDefault}
|
||||
style={{ marginLeft: StyleConstants.Spacing.XS }}
|
||||
strokeWidth={3}
|
||||
/>
|
||||
) : null}
|
||||
<Icon
|
||||
name='ChevronDown'
|
||||
size={StyleConstants.Font.Size.M}
|
||||
color={colors.primaryDefault}
|
||||
style={{ marginLeft: StyleConstants.Spacing.XS, opacity: dropdown ? undefined : 0 }}
|
||||
strokeWidth={3}
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
@ -3,10 +3,7 @@ import { HeaderCenter, HeaderRight } from '@components/Header'
|
||||
import Timeline from '@components/Timeline'
|
||||
import TimelineDefault from '@components/Timeline/Default'
|
||||
import { createNativeStackNavigator } from '@react-navigation/native-stack'
|
||||
import {
|
||||
ScreenTabsScreenProps,
|
||||
TabLocalStackParamList
|
||||
} from '@utils/navigation/navigators'
|
||||
import { ScreenTabsScreenProps, TabLocalStackParamList } from '@utils/navigation/navigators'
|
||||
import { useListsQuery } from '@utils/queryHooks/lists'
|
||||
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
|
||||
import layoutAnimation from '@utils/styles/layoutAnimation'
|
||||
@ -26,10 +23,7 @@ const TabLocal = React.memo(
|
||||
layoutAnimation()
|
||||
}, [lists?.length])
|
||||
|
||||
const [queryKey, setQueryKey] = useState<QueryKeyTimeline>([
|
||||
'Timeline',
|
||||
{ page: 'Following' }
|
||||
])
|
||||
const [queryKey, setQueryKey] = useState<QueryKeyTimeline>(['Timeline', { page: 'Following' }])
|
||||
|
||||
return (
|
||||
<Stack.Navigator screenOptions={{ headerShadowVisible: false }}>
|
||||
@ -51,9 +45,7 @@ const TabLocal = React.memo(
|
||||
...lists.map(list => ({
|
||||
id: list.id,
|
||||
title: list.title,
|
||||
disabled:
|
||||
queryKey[1].page === 'List' &&
|
||||
queryKey[1].list === list.id
|
||||
disabled: queryKey[1].page === 'List' && queryKey[1].list === list.id
|
||||
}))
|
||||
]
|
||||
: undefined
|
||||
@ -68,8 +60,7 @@ const TabLocal = React.memo(
|
||||
dropdown={(lists?.length ?? 0) > 0}
|
||||
content={
|
||||
queryKey[1].page === 'List' && queryKey[1].list?.length
|
||||
? lists?.find(list => list.id === queryKey[1].list)
|
||||
?.title
|
||||
? lists?.find(list => list.id === queryKey[1].list)?.title
|
||||
: t('tabs.local.name')
|
||||
}
|
||||
/>
|
||||
@ -96,9 +87,7 @@ const TabLocal = React.memo(
|
||||
queryKey={queryKey}
|
||||
lookback='Following'
|
||||
customProps={{
|
||||
renderItem: ({ item }) => (
|
||||
<TimelineDefault item={item} queryKey={queryKey} />
|
||||
)
|
||||
renderItem: ({ item }) => <TimelineDefault item={item} queryKey={queryKey} />
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user