manifold/web/components/landing-page-panel.tsx

62 lines
2.1 KiB
TypeScript
Raw Normal View History

2022-09-12 22:34:13 +00:00
import Image from 'next/future/image'
import { SparklesIcon } from '@heroicons/react/solid'
2022-06-13 16:19:46 +00:00
import { Contract } from 'common/contract'
import { Spacer } from './layout/spacer'
import { firebaseLogin } from 'web/lib/firebase/users'
import { ContractsGrid } from './contract/contracts-grid'
2022-01-27 00:21:14 +00:00
import { Col } from './layout/col'
2022-03-03 08:56:03 +00:00
import { Row } from './layout/row'
import { withTracking } from 'web/lib/service/analytics'
2022-06-16 02:42:11 +00:00
import { useTracking } from 'web/hooks/use-tracking'
2022-06-13 16:19:46 +00:00
export function LandingPagePanel(props: { hotContracts: Contract[] }) {
const { hotContracts } = props
2022-06-16 02:42:11 +00:00
useTracking('view landing page')
return (
<>
2022-06-13 16:19:46 +00:00
<Col className="mb-6 rounded-xl sm:m-12 sm:mt-0">
2022-09-12 22:34:13 +00:00
<Image
2022-05-17 14:25:51 +00:00
height={250}
width={250}
className="self-center"
src="/flappy-logo.gif"
/>
2022-06-13 16:52:29 +00:00
<div className="m-4 max-w-[550px] self-center">
2022-06-13 16:19:46 +00:00
<h1 className="text-3xl sm:text-6xl xl:text-6xl">
<div className="font-semibold sm:mb-2">
2022-09-07 20:01:02 +00:00
A{' '}
2022-06-13 16:19:46 +00:00
<span className="bg-gradient-to-r from-indigo-500 to-blue-500 bg-clip-text font-bold text-transparent">
2022-09-07 20:01:02 +00:00
market
</span>{' '}
for every question
2022-06-13 16:19:46 +00:00
</div>
</h1>
<Spacer h={6} />
<div className="mb-4 px-2 ">
2022-09-07 20:01:02 +00:00
Create a play-money prediction market on any topic you care about.
Trade with your friends to forecast the future.
2022-06-13 16:19:46 +00:00
<br />
</div>
</div>
2022-01-27 00:21:14 +00:00
<Spacer h={6} />
<button
2022-06-13 16:19:46 +00:00
className="self-center rounded-md border-none bg-gradient-to-r from-indigo-500 to-blue-500 py-4 px-6 text-lg font-semibold normal-case text-white hover:from-indigo-600 hover:to-blue-600"
onClick={withTracking(firebaseLogin, 'landing page button click')}
2022-01-27 00:21:14 +00:00
>
2022-06-13 16:19:46 +00:00
Get started
2022-01-27 00:21:14 +00:00
</button>{' '}
</Col>
2022-01-22 20:52:49 +00:00
2022-03-03 08:56:03 +00:00
<Row className="m-4 mb-6 items-center gap-1 text-xl font-semibold text-gray-800">
<SparklesIcon className="inline h-5 w-5" aria-hidden="true" />
2022-05-07 23:44:01 +00:00
Trending markets
2022-03-03 08:56:03 +00:00
</Row>
<ContractsGrid contracts={hotContracts?.slice(0, 10) || []} />
</>
)
}