Enable Sticky on the homepage

This excludes mobile and other scenarios handled by the `should*` variables.
This commit is contained in:
infinite-persistence 2022-06-15 17:02:49 +08:00 committed by Thomas Zarebczan
parent e70ed61d4e
commit 91e83760d4

View file

@ -49,7 +49,7 @@ export default function AdsSticky(props: Props) {
function shouldShowAdsForPath(pathname, isContentClaim, isChannelClaim, authenticated) {
// $FlowIssue: mixed type
const pathIsCategory = Object.values(homepageData).some((x) => pathname.startsWith(`/$/${x?.name}`));
return pathIsCategory || isChannelClaim || (isContentClaim && !authenticated);
return pathIsCategory || isChannelClaim || (isContentClaim && !authenticated) || pathname === '/';
}
React.useEffect(() => {