tooot/src/screens/Tabs/Shared/Attachments.tsx

26 lines
770 B
TypeScript
Raw Normal View History

2021-02-08 23:47:20 +01:00
import Timeline from '@components/Timeline'
2021-02-27 16:33:54 +01:00
import TimelineDefault from '@components/Timeline/Default'
2021-08-29 15:25:38 +02:00
import { TabSharedStackScreenProps } from '@utils/navigation/navigators'
2021-02-27 16:33:54 +01:00
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
import React, { useCallback } from 'react'
2021-01-16 00:00:31 +01:00
2021-08-29 15:25:38 +02:00
const TabSharedAttachments: React.FC<TabSharedStackScreenProps<
'Tab-Shared-Attachments'
>> = ({
2021-01-16 00:00:31 +01:00
route: {
params: { account }
}
}) => {
2021-02-27 16:33:54 +01:00
const queryKey: QueryKeyTimeline = [
'Timeline',
{ page: 'Account_Attachments', account: account.id }
]
const renderItem = useCallback(
({ item }) => <TimelineDefault item={item} queryKey={queryKey} />,
[]
)
return <Timeline queryKey={queryKey} customProps={{ renderItem }} />
2021-01-16 00:00:31 +01:00
}
2021-01-30 01:29:15 +01:00
export default TabSharedAttachments