Skip to content

Commit

Permalink
Fix affix tab in mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Mar 6, 2024
1 parent 1039fd1 commit fab629e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/main/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import MobileActiveStakingSection from '../creators/MobileActiveStakingSection'
import { ShowLikeablePostsProvider } from '../posts/ShowLikeablePostsContext'
import WriteSomething from '../posts/WriteSomething'
import { useReferralId } from '../referral/ReferralUrlChanger'
import { useIsMobileWidthOrDevice } from '../responsive'
import { CreatorsSpaces } from '../spaces/LatestSpacesPage'
import Section from '../utils/Section'
import style from './HomePage.module.sass'
Expand Down Expand Up @@ -187,6 +188,7 @@ const TabsHomePage = ({
return <CreatorsSpaces />
}
}, [tab, type, date, myAddress])
const isMobile = useIsMobileWidthOrDevice()

return (
<>
Expand All @@ -195,8 +197,11 @@ const TabsHomePage = ({
<CommentBanner />
</div> */}
<ShowLikeablePostsProvider tab={tab} filter={type}>
<AffixTabs tabKey={tab} setKey={onChangeKey} visible={hidden} {...props} />
{!isMobile && <AffixTabs tabKey={tab} setKey={onChangeKey} visible={hidden} {...props} />}
<Section className='m-0'>
{isMobile && (
<HomeTabs tabKey={tab} className='DfHomeTab' setKey={onChangeKey} {...props} />
)}
<TabsContent />
<Tooltip title={'Back to top'} placement={'right'}>
<BackTop className={style.DfBackToTop}>
Expand Down

0 comments on commit fab629e

Please sign in to comment.