2023-07-22 12:55:21 -07:00
|
|
|
import { useFeatures, useLoggedIn } from 'soapbox/hooks';
|
2023-07-22 10:49:02 -07:00
|
|
|
|
|
|
|
import { useTimelineStream } from './useTimelineStream';
|
|
|
|
|
|
|
|
function useNostrStream() {
|
|
|
|
const features = useFeatures();
|
2023-07-22 12:55:21 -07:00
|
|
|
const { isLoggedIn } = useLoggedIn();
|
|
|
|
|
|
|
|
return useTimelineStream(
|
|
|
|
'nostr',
|
|
|
|
'nostr',
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
{
|
|
|
|
enabled: isLoggedIn && features.nostrSign && Boolean(window.nostr),
|
|
|
|
},
|
|
|
|
);
|
2023-07-22 10:49:02 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export { useNostrStream };
|