diff --git a/common/src/envs/constants.ts b/common/src/envs/constants.ts index 2028e8d9e3..7a469942cb 100644 --- a/common/src/envs/constants.ts +++ b/common/src/envs/constants.ts @@ -11,9 +11,9 @@ export const CONFIGS: { [env: string]: EnvConfig } = { DEV: DEV_CONFIG, } -export const TWOMBA_ENABLED = false +export const TWOMBA_ENABLED = true export const PRODUCT_MARKET_FIT_ENABLED = false -export const SPICE_PRODUCTION_ENABLED = true +export const SPICE_PRODUCTION_ENABLED = false export const SPICE_TO_MANA_CONVERSION_RATE = 1 export const CASH_TO_MANA_CONVERSION_RATE = 100 export const MIN_CASH_DONATION = 25 diff --git a/web/components/layout/page.tsx b/web/components/layout/page.tsx index 8cc3cd55b7..65460692af 100644 --- a/web/components/layout/page.tsx +++ b/web/components/layout/page.tsx @@ -8,10 +8,11 @@ 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 } from '../nav/banner' +import { DowntimeBanner, TwombaBanner } 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 @@ -67,6 +68,7 @@ export function Page(props: { className )} > + {TWOMBA_ENABLED && } {maintainanceBannerEnabled && user && ( {/*🛠️ Site is undergoing maintenance, sorry for the inconvenience.*/} diff --git a/web/components/nav/banner.tsx b/web/components/nav/banner.tsx index ce8d1cb6f5..a25901cbff 100644 --- a/web/components/nav/banner.tsx +++ b/web/components/nav/banner.tsx @@ -5,6 +5,7 @@ import { IconButton } from '../buttons/button' import { Row } from '../layout/row' import { LogoIcon } from '../icons/logo-icon' import { usePersistentLocalState } from 'web/hooks/use-persistent-local-state' +import Link from 'next/link' export function Banner(props: { setShowBanner?: (show: boolean) => void @@ -20,9 +21,16 @@ export function Banner(props: { 'text-ink-900 bg-primary-100 z-10 justify-between gap-4' )} > - - {children} - + {link && ( + + {children} + + )} {setShowBanner && ( { return [!bannerSeen, () => setBannerSeen(1)] as const } + +export const TwombaBanner = () => { + const [showBanner, hideBanner] = useBanner('twomba') + if (!showBanner) return null + return ( + + + + Sweepstakes cash prizes are here! Read more + + + ) +}