Skip to content

Commit

Permalink
only show twomba banner on homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
mantikoros committed Sep 18, 2024
1 parent 4e74804 commit 91a0d20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 1 addition & 3 deletions web/components/layout/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ import { Col } from './col'
import { GoogleOneTapLogin } from 'web/lib/firebase/google-onetap-login'
import { ConfettiOnDemand } from '../confetti-on-demand'
import { useTracking } from 'web/hooks/use-tracking'
import { DowntimeBanner, TwombaBanner } from '../nav/banner'
import { DowntimeBanner } from '../nav/banner'
import { useUser } from 'web/hooks/use-user'

import { UpdatedTermsModal } from '../updated-terms-modal'
import { TWOMBA_ENABLED } from 'common/envs/constants'

export function Page(props: {
trackPageView: string | false
Expand Down Expand Up @@ -68,7 +67,6 @@ export function Page(props: {
className
)}
>
{TWOMBA_ENABLED && <TwombaBanner />}
{maintainanceBannerEnabled && user && (
<DowntimeBanner>
{/*🛠️ Site is undergoing maintenance, sorry for the inconvenience.*/}
Expand Down
5 changes: 5 additions & 0 deletions web/pages/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { Headline } from 'common/news'
import { HeadlineTabs } from 'web/components/dashboard/header'
import { useRedirectIfSignedOut } from 'web/hooks/use-redirect-if-signed-out'
import { Welcome } from 'web/components/onboarding/welcome'
import { TWOMBA_ENABLED } from 'common/envs/constants'
import { TwombaBanner } from 'web/components/nav/banner'

export async function getStaticProps() {
try {
Expand All @@ -40,6 +42,9 @@ export default function Home(props: { headlines: Headline[] }) {
<Page trackPageView={'home'} className="!mt-0">
<Welcome />
<SEO title={`Home`} description={`Browse all questions`} url={`/home`} />

{TWOMBA_ENABLED && <TwombaBanner />}

<HeadlineTabs
endpoint={'news'}
headlines={headlines}
Expand Down

0 comments on commit 91a0d20

Please sign in to comment.