Hide unauth features if they're restricted by the backend
This commit is contained in:
@ -2,12 +2,16 @@ import { useTimelineStream } from './useTimelineStream';
|
||||
|
||||
interface UseCommunityStreamOpts {
|
||||
onlyMedia?: boolean
|
||||
enabled?: boolean
|
||||
}
|
||||
|
||||
function useCommunityStream({ onlyMedia }: UseCommunityStreamOpts = {}) {
|
||||
function useCommunityStream({ onlyMedia, enabled }: UseCommunityStreamOpts = {}) {
|
||||
return useTimelineStream(
|
||||
`community${onlyMedia ? ':media' : ''}`,
|
||||
`public:local${onlyMedia ? ':media' : ''}`,
|
||||
undefined,
|
||||
undefined,
|
||||
{ enabled },
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user