limit number of accounts to 5

This commit is contained in:
saml33 2023-08-11 15:18:59 +10:00
parent 82de613eb9
commit 2885e6e8c4
13 changed files with 26 additions and 2 deletions

View File

@ -228,7 +228,7 @@ const MangoAccountsListModal = ({
</div>
)}
</div>
<div className="pt-6">
{mangoAccounts.length < 5 ? (
<LinkButton
className="w-full justify-center"
onClick={() => setShowNewAccountForm(true)}
@ -236,7 +236,19 @@ const MangoAccountsListModal = ({
<PlusCircleIcon className="h-5 w-5" />
<span className="ml-2">{t('add-new-account')}</span>
</LinkButton>
</div>
) : (
<p className="text-center">
{t('account:need-more-accounts')}{' '}
<a
className="focus:outline-none"
href="https://discord.gg/2uwjsBc5yw"
rel="noreferrer noopener"
target="_blank"
>
{t('discord')}
</a>
</p>
)}
<EnterRightExitLeft
className="absolute bottom-0 left-0 z-20 h-full w-full overflow-hidden bg-th-bkg-1"
show={showNewAccountForm}

View File

@ -6,6 +6,7 @@ export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale, [
'account',
'common',
'notifications',
'profile',

View File

@ -6,6 +6,7 @@ export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale, [
'account',
'borrow',
'common',
'notifications',

View File

@ -6,6 +6,7 @@ export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale, [
'account',
'common',
'leaderboard',
'notifications',

View File

@ -7,6 +7,7 @@ export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale, [
'account',
'common',
'notifications',
'onboarding',

View File

@ -6,6 +6,7 @@ export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale, [
'account',
'common',
'notifications',
'profile',

View File

@ -11,6 +11,7 @@ export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale, [
'account',
'common',
'notifications',
'onboarding',

View File

@ -6,6 +6,7 @@ export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale, [
'account',
'activity',
'common',
'notifications',

View File

@ -15,6 +15,7 @@
"lifetime-volume": "Lifetime Trade Volume",
"maint-health-contribution": "Maint Health Contribution",
"maint-health-contributions": "Maint Health Contributions",
"need-more-accounts": "Need more accounts? Reach out to us on",
"no-data": "No data to display",
"no-pnl-history": "No PnL History",
"pnl-chart": "PnL Chart",

View File

@ -15,6 +15,7 @@
"lifetime-volume": "Lifetime Trade Volume",
"maint-health-contribution": "Maint Health Contribution",
"maint-health-contributions": "Maint Health Contributions",
"need-more-accounts": "Need more accounts? Reach out to us on",
"no-data": "No data to display",
"no-pnl-history": "No PnL History",
"pnl-chart": "PnL Chart",

View File

@ -15,6 +15,7 @@
"lifetime-volume": "Lifetime Trade Volume",
"maint-health-contribution": "Maint Health Contribution",
"maint-health-contributions": "Maint Health Contributions",
"need-more-accounts": "Need more accounts? Reach out to us on",
"no-data": "No data to display",
"no-pnl-history": "No PnL History",
"pnl-chart": "PnL Chart",

View File

@ -15,6 +15,7 @@
"lifetime-volume": "Lifetime Trade Volume",
"maint-health-contribution": "Maint Health Contribution",
"maint-health-contributions": "Maint Health Contributions",
"need-more-accounts": "Need more accounts? Reach out to us on",
"no-data": "No data to display",
"no-pnl-history": "No PnL History",
"pnl-chart": "PnL Chart",

View File

@ -15,6 +15,7 @@
"lifetime-volume": "Lifetime Trade Volume",
"maint-health-contribution": "Maint Health Contribution",
"maint-health-contributions": "Maint Health Contributions",
"need-more-accounts": "Need more accounts? Reach out to us on",
"no-data": "No data to display",
"no-pnl-history": "No PnL History",
"pnl-chart": "PnL Chart",