Skip to content

Commit

Permalink
Ingawei/man 1718 put us only on sweeps registration page (#2885)
Browse files Browse the repository at this point in the history
  • Loading branch information
ingawei authored Sep 18, 2024
1 parent 34f7e3b commit 7742f69
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
8 changes: 4 additions & 4 deletions web/components/gidx/register-user-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ export const RegisterUserForm = (props: {
onChange={(e) => setUserInfo({ ...userInfo, City: e.target.value })}
/>
</Col>
<Row className={'gap-4'}>
<Col className={'w-1/2 gap-0.5'}>
<div className={'flex flex-col gap-4 sm:flex-row'}>
<Col className={'w-full gap-0.5 sm:w-1/2'}>
<InputTitle>State</InputTitle>
<Input
placeholder={'Your state'}
Expand All @@ -297,7 +297,7 @@ export const RegisterUserForm = (props: {
}
/>
</Col>
<Col className={'w-1/2 gap-0.5'}>
<Col className={'w-full gap-0.5 sm:w-1/2'}>
<InputTitle>Postal Code</InputTitle>
<Input
placeholder={'Your postal code'}
Expand All @@ -308,7 +308,7 @@ export const RegisterUserForm = (props: {
}
/>
</Col>
</Row>
</div>
{error && (
<Col className={'text-error'}>
{error}
Expand Down
16 changes: 14 additions & 2 deletions web/pages/gidx/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,28 @@ import { RegisterUserForm } from 'web/components/gidx/register-user-form'

import { TWOMBA_ENABLED } from 'common/envs/constants'
import { Col } from 'web/components/layout/col'
import { Tooltip } from 'web/components/widgets/tooltip'
import { Row } from 'web/components/layout/row'
import { InfoTooltip } from 'web/components/widgets/info-tooltip'
import { LiaFlagUsaSolid } from 'react-icons/lia'

const HomePage = () => {
const user = useUser()
const privateUser = usePrivateUser()
if (!TWOMBA_ENABLED) return null
return (
<Page trackPageView={'register user gidx'}>
<Col className="bg-canvas-0 mx-auto w-full max-w-lg gap-4 px-6 py-4">
<Col className="bg-canvas-0 relative mx-auto w-full max-w-lg gap-4 px-6 py-4">
<Row className="text-ink-600 w-full select-none justify-end gap-1 rounded">
<Tooltip
className="flex flex-row items-center gap-1 "
text="Sweepstakes are limited to 18+ in all US states except WA, MI, ID, DE"
>
<LiaFlagUsaSolid className="h-6 w-6" /> US only
</Tooltip>
</Row>
{!user || !privateUser ? (
<LoadingIndicator />
<LoadingIndicator className="mx-auto my-auto h-80" />
) : (
<RegisterUserForm user={user} privateUser={privateUser} />
)}
Expand Down

0 comments on commit 7742f69

Please sign in to comment.