2021-02-08 23:47:20 +01:00
|
|
|
import Timeline from '@components/Timeline'
|
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'
|
2022-12-03 16:50:54 +01:00
|
|
|
import React, { useEffect } from 'react'
|
2021-01-16 00:00:31 +01:00
|
|
|
|
2022-12-03 16:50:54 +01:00
|
|
|
const TabSharedAttachments: React.FC<TabSharedStackScreenProps<'Tab-Shared-Attachments'>> = ({
|
|
|
|
navigation,
|
2021-01-16 00:00:31 +01:00
|
|
|
route: {
|
|
|
|
params: { account }
|
|
|
|
}
|
|
|
|
}) => {
|
2022-12-03 16:50:54 +01:00
|
|
|
useEffect(() => {
|
2023-01-04 22:39:29 +01:00
|
|
|
navigation.setParams({ queryKey })
|
2022-12-03 16:50:54 +01:00
|
|
|
}, [])
|
|
|
|
|
2021-02-27 16:33:54 +01:00
|
|
|
const queryKey: QueryKeyTimeline = [
|
|
|
|
'Timeline',
|
2023-02-26 21:51:31 +01:00
|
|
|
{
|
|
|
|
page: 'Account',
|
|
|
|
type: 'attachments',
|
|
|
|
id: account.id,
|
|
|
|
...(account._remote && { remote_id: account.id, remote_domain: account._remote })
|
|
|
|
}
|
2021-02-27 16:33:54 +01:00
|
|
|
]
|
2022-12-03 16:50:54 +01:00
|
|
|
|
2023-01-07 16:27:40 +01:00
|
|
|
return <Timeline queryKey={queryKey} />
|
2021-01-16 00:00:31 +01:00
|
|
|
}
|
|
|
|
|
2021-01-30 01:29:15 +01:00
|
|
|
export default TabSharedAttachments
|