91bec9c996
* Referrals page added to sidebar; useSaveReferral; InfoBox * text color * eslint * migrate useUsers hook to react-query (#674) * Remove bet button from free response comments * Make answer replies more closely spaced together * Host Ida and Alex's MTG Guesser game (#656) * Copy over code from Mtg Guesser * Run Prettier * CSS Tweaks: Hover feedback, button positioning * Hide all but counterspell & burn, for now * Move to /mtg directory * Fix prettierignore * smaller jsons (#673) limited burn to only red cards and also added limited json files to only have fields needed to play * Add Ida's tweak to card position Co-authored-by: marsteralex <bob.masteralex@gmail.com> * Adjust card positioning * Make the select screen index.html * Remove other guessing games * Remove alternate versions; add Alex's email * Remove unused jsons * Small FR comments tweaks * Spacing tweak * Changing manalinks table UI (#665) From table to card view * Fix comment spacing on non-FR * Move "Send M$" lower in sidebar More list. * Move leaderboards up in mobile nav * eslint * prettier Co-authored-by: Sinclair Chen <abc.sinclair@gmail.com> Co-authored-by: James Grugett <jahooma@gmail.com> Co-authored-by: Austin Chen <akrolsmir@gmail.com> Co-authored-by: marsteralex <bob.masteralex@gmail.com> Co-authored-by: ingawei <46611122+ingawei@users.noreply.github.com>
58 lines
1.8 KiB
TypeScript
58 lines
1.8 KiB
TypeScript
import { Col } from 'web/components/layout/col'
|
|
import { SEO } from 'web/components/SEO'
|
|
import { Title } from 'web/components/title'
|
|
import { useUser } from 'web/hooks/use-user'
|
|
import { Page } from 'web/components/page'
|
|
import { useTracking } from 'web/hooks/use-tracking'
|
|
import { redirectIfLoggedOut } from 'web/lib/firebase/server-auth'
|
|
import { REFERRAL_AMOUNT } from 'common/user'
|
|
import { CopyLinkButton } from 'web/components/copy-link-button'
|
|
import { ENV_CONFIG } from 'common/envs/constants'
|
|
import { InfoBox } from 'web/components/info-box'
|
|
|
|
export const getServerSideProps = redirectIfLoggedOut('/')
|
|
|
|
export default function ReferralsPage() {
|
|
const user = useUser()
|
|
|
|
useTracking('view referrals')
|
|
|
|
const url = `https://${ENV_CONFIG.domain}?referrer=${user?.username}`
|
|
|
|
return (
|
|
<Page>
|
|
<SEO title="Referrals" description="" url="/add-funds" />
|
|
|
|
<Col className="items-center">
|
|
<Col className="h-full rounded bg-white p-4 py-8 sm:p-8 sm:shadow-md">
|
|
<Title className="!mt-0" text="Referrals" />
|
|
<img
|
|
className="mb-6 block -scale-x-100 self-center"
|
|
src="/logo-flapping-with-money.gif"
|
|
width={200}
|
|
height={200}
|
|
/>
|
|
|
|
<div className={'mb-4'}>
|
|
Invite new users to Manifold and get M${REFERRAL_AMOUNT} if they
|
|
sign up!
|
|
</div>
|
|
|
|
<CopyLinkButton
|
|
url={url}
|
|
tracking="copy referral link"
|
|
buttonClassName="btn-md rounded-l-none"
|
|
toastClassName={'-left-28 mt-1'}
|
|
/>
|
|
|
|
<InfoBox
|
|
title="FYI"
|
|
className="mt-4 max-w-md"
|
|
text="You can also earn the referral bonus from sharing the link to any market or group you've created!"
|
|
/>
|
|
</Col>
|
|
</Col>
|
|
</Page>
|
|
)
|
|
}
|