mirror of
https://github.com/tooot-app/app
synced 2024-12-28 18:30:20 +01:00
Temp remove lookback component
This commit is contained in:
parent
46bd9186fa
commit
d08c1bf7ac
@ -1,9 +1,7 @@
|
|||||||
import analytics from '@components/analytics'
|
import analytics from '@components/analytics'
|
||||||
import { HeaderCenter, HeaderRight } from '@components/Header'
|
import { HeaderCenter, HeaderRight } from '@components/Header'
|
||||||
import ComponentSeparator from '@components/Separator'
|
|
||||||
import Timeline from '@components/Timeline'
|
import Timeline from '@components/Timeline'
|
||||||
import TimelineDefault from '@components/Timeline/Default'
|
import TimelineDefault from '@components/Timeline/Default'
|
||||||
import TimelineLookback from '@components/Timeline/Lookback'
|
|
||||||
import { createNativeStackNavigator } from '@react-navigation/native-stack'
|
import { createNativeStackNavigator } from '@react-navigation/native-stack'
|
||||||
import {
|
import {
|
||||||
ScreenTabsScreenProps,
|
ScreenTabsScreenProps,
|
||||||
@ -11,7 +9,6 @@ import {
|
|||||||
} from '@utils/navigation/navigators'
|
} from '@utils/navigation/navigators'
|
||||||
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
|
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
|
||||||
import { getInstanceTimelinesLookback } from '@utils/slices/instancesSlice'
|
import { getInstanceTimelinesLookback } from '@utils/slices/instancesSlice'
|
||||||
import { StyleConstants } from '@utils/styles/constants'
|
|
||||||
import React, { useCallback, useMemo } from 'react'
|
import React, { useCallback, useMemo } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { Platform } from 'react-native'
|
import { Platform } from 'react-native'
|
||||||
@ -55,17 +52,7 @@ const TabLocal = React.memo(
|
|||||||
const queryKey: QueryKeyTimeline = ['Timeline', { page: 'Following' }]
|
const queryKey: QueryKeyTimeline = ['Timeline', { page: 'Following' }]
|
||||||
const renderItem = useCallback(({ item }) => {
|
const renderItem = useCallback(({ item }) => {
|
||||||
if (timelinesLookback?.['Following']?.ids?.[0] === item.id) {
|
if (timelinesLookback?.['Following']?.ids?.[0] === item.id) {
|
||||||
return (
|
return <TimelineDefault item={item} queryKey={queryKey} />
|
||||||
<>
|
|
||||||
<TimelineLookback />
|
|
||||||
<ComponentSeparator
|
|
||||||
extraMarginLeft={
|
|
||||||
StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
<TimelineDefault item={item} queryKey={queryKey} />
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
return <TimelineDefault item={item} queryKey={queryKey} />
|
return <TimelineDefault item={item} queryKey={queryKey} />
|
||||||
}, [])
|
}, [])
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
import analytics from '@components/analytics'
|
import analytics from '@components/analytics'
|
||||||
import { HeaderRight } from '@components/Header'
|
import { HeaderRight } from '@components/Header'
|
||||||
import ComponentSeparator from '@components/Separator'
|
|
||||||
import Timeline from '@components/Timeline'
|
import Timeline from '@components/Timeline'
|
||||||
import TimelineDefault from '@components/Timeline/Default'
|
import TimelineDefault from '@components/Timeline/Default'
|
||||||
import TimelineLookback from '@components/Timeline/Lookback'
|
|
||||||
import SegmentedControl from '@react-native-community/segmented-control'
|
import SegmentedControl from '@react-native-community/segmented-control'
|
||||||
import { createNativeStackNavigator } from '@react-navigation/native-stack'
|
import { createNativeStackNavigator } from '@react-navigation/native-stack'
|
||||||
import {
|
import {
|
||||||
@ -12,7 +10,6 @@ import {
|
|||||||
} from '@utils/navigation/navigators'
|
} from '@utils/navigation/navigators'
|
||||||
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
|
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
|
||||||
import { getInstanceTimelinesLookback } from '@utils/slices/instancesSlice'
|
import { getInstanceTimelinesLookback } from '@utils/slices/instancesSlice'
|
||||||
import { StyleConstants } from '@utils/styles/constants'
|
|
||||||
import { useTheme } from '@utils/styles/ThemeManager'
|
import { useTheme } from '@utils/styles/ThemeManager'
|
||||||
import React, { useCallback, useMemo, useState } from 'react'
|
import React, { useCallback, useMemo, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
@ -90,17 +87,7 @@ const TabPublic = React.memo(
|
|||||||
const queryKey: QueryKeyTimeline = ['Timeline', { page }]
|
const queryKey: QueryKeyTimeline = ['Timeline', { page }]
|
||||||
const renderItem = ({ item }: any) => {
|
const renderItem = ({ item }: any) => {
|
||||||
if (timelinesLookback?.[page]?.ids?.[0] === item.id) {
|
if (timelinesLookback?.[page]?.ids?.[0] === item.id) {
|
||||||
return (
|
return <TimelineDefault item={item} queryKey={queryKey} />
|
||||||
<>
|
|
||||||
<TimelineLookback />
|
|
||||||
<ComponentSeparator
|
|
||||||
extraMarginLeft={
|
|
||||||
StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
<TimelineDefault item={item} queryKey={queryKey} />
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
return <TimelineDefault item={item} queryKey={queryKey} />
|
return <TimelineDefault item={item} queryKey={queryKey} />
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user