2024-02-20 18:54:20 -08:00
|
|
|
import NotWhitelistedPage from '@components/rewards/NotWhitelistedPage'
|
2023-06-08 22:43:54 -07:00
|
|
|
import RewardsPage from '@components/rewards/RewardsPage'
|
2023-09-27 15:08:39 -07:00
|
|
|
import mangoStore from '@store/mangoStore'
|
2023-07-11 15:48:05 -07:00
|
|
|
import { useIsWhiteListed } from 'hooks/useIsWhiteListed'
|
2023-06-08 22:43:54 -07:00
|
|
|
import type { NextPage } from 'next'
|
|
|
|
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
2023-12-12 18:58:35 -08:00
|
|
|
import Head from 'next/head'
|
2023-06-08 22:43:54 -07:00
|
|
|
|
|
|
|
export async function getStaticProps({ locale }: { locale: string }) {
|
|
|
|
return {
|
|
|
|
props: {
|
|
|
|
...(await serverSideTranslations(locale, [
|
2023-12-06 19:54:53 -08:00
|
|
|
'account',
|
2023-12-02 03:55:19 -08:00
|
|
|
'close-account',
|
2023-06-08 22:43:54 -07:00
|
|
|
'common',
|
2023-10-19 04:46:19 -07:00
|
|
|
'governance',
|
2023-06-08 22:43:54 -07:00
|
|
|
'notifications',
|
|
|
|
'onboarding',
|
|
|
|
'profile',
|
|
|
|
'rewards',
|
|
|
|
'search',
|
2023-09-14 07:47:21 -07:00
|
|
|
'settings',
|
2023-06-08 22:43:54 -07:00
|
|
|
])),
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-12-12 18:58:35 -08:00
|
|
|
const metaTitle = 'Rewards | Be Rewarded for Trading on Mango'
|
|
|
|
const metaDescription =
|
|
|
|
'Earn crypto and NFT rewards every week for trading on Mango. Getting started is easy and all participants earn rewards.'
|
|
|
|
|
2023-06-08 22:43:54 -07:00
|
|
|
const Rewards: NextPage = () => {
|
2023-07-11 15:48:05 -07:00
|
|
|
const { data: isWhiteListed } = useIsWhiteListed()
|
2023-09-27 15:08:39 -07:00
|
|
|
const themeData = mangoStore((s) => s.themeData)
|
|
|
|
return (
|
2023-12-12 18:58:35 -08:00
|
|
|
<>
|
|
|
|
<Head>
|
|
|
|
<title>Rewards | Mango Markets</title>
|
|
|
|
<meta name="description" content={metaDescription} />
|
|
|
|
<meta property="og:title" content={metaTitle} />
|
|
|
|
<meta name="og:description" content={metaDescription} />
|
|
|
|
<meta name="twitter:title" content={metaTitle} />
|
|
|
|
<meta name="twitter:description" content={metaDescription} />
|
|
|
|
</Head>
|
|
|
|
<div
|
|
|
|
className={`pb-20 md:pb-0 ${themeData.fonts.rewards.variable} font-sans`}
|
|
|
|
>
|
2024-02-20 18:54:20 -08:00
|
|
|
{isWhiteListed ? <RewardsPage /> : <NotWhitelistedPage />}
|
2023-12-12 18:58:35 -08:00
|
|
|
</div>
|
|
|
|
</>
|
2023-09-27 15:08:39 -07:00
|
|
|
)
|
2023-06-08 22:43:54 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export default Rewards
|