Hide unauth features if they're restricted by the backend

This commit is contained in:
Alex Gleason
2023-09-24 12:51:00 -05:00
parent aabaaee8b8
commit 8500e7bb9a
4 changed files with 59 additions and 25 deletions

View File

@ -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 },
);
}