2023-07-22 12:55:21 -07:00
|
|
|
import { useLoggedIn } from 'soapbox/hooks';
|
|
|
|
|
2023-07-22 12:03:00 -07:00
|
|
|
import { useTimelineStream } from './useTimelineStream';
|
|
|
|
|
|
|
|
function useListStream(listId: string) {
|
2023-07-22 12:55:21 -07:00
|
|
|
const { isLoggedIn } = useLoggedIn();
|
|
|
|
|
2023-07-22 12:03:00 -07:00
|
|
|
return useTimelineStream(
|
|
|
|
`list:${listId}`,
|
|
|
|
`list&list=${listId}`,
|
2023-07-22 12:55:21 -07:00
|
|
|
null,
|
|
|
|
null,
|
|
|
|
{ enabled: isLoggedIn },
|
2023-07-22 12:03:00 -07:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export { useListStream };
|