pleroma/app/soapbox/api/hooks/streaming/useListStream.ts

17 lines
345 B
TypeScript
Raw Normal View History

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