Expand override for mobile livestream layout

This commit is contained in:
Rafael 2022-02-09 12:56:24 -03:00 committed by Thomas Zarebczan
parent 2a7b9364e4
commit 63cc5da092

View file

@ -13,6 +13,7 @@ import I18nMessage from 'component/i18nMessage';
import Button from 'component/button';
import FileDescription from 'component/fileDescription';
import { ENABLE_MATURE } from 'config';
import { useIsMobile } from 'effects/use-screensize';
type Props = {
uri: string,
@ -40,6 +41,8 @@ export default function FileTitleSection(props: Props) {
doFetchSubCount,
} = props;
const isMobile = useIsMobile();
React.useEffect(() => {
if (channelClaimId) doFetchSubCount(channelClaimId);
}, [channelClaimId, doFetchSubCount]);
@ -100,7 +103,7 @@ export default function FileTitleSection(props: Props) {
) : (
<>
<ClaimAuthor channelSubCount={subCount} uri={uri} />
<FileDescription uri={uri} />
<FileDescription expandOverride={isMobile && livestream} uri={uri} />
</>
)
}