diff --git a/web/components/contract/contract-tabs.tsx b/web/components/contract/contract-tabs.tsx index 4fbadeb6..119ecc0a 100644 --- a/web/components/contract/contract-tabs.tsx +++ b/web/components/contract/contract-tabs.tsx @@ -48,17 +48,14 @@ export function ContractTabs(props: { const tabs = buildArray( { - title: `Comments ${ - openCommentBounties - ? '(' + formatMoney(openCommentBounties) + ' Bounty)' - : '' - }`, + title: `Comments`, tooltip: openCommentBounties ? `The creator of this market will award bounties of ${formatMoney( COMMENT_BOUNTY_AMOUNT )} to good comments` : undefined, content: , + inlineTabIcon: ({formatMoney(COMMENT_BOUNTY_AMOUNT)}), }, { title: capitalize(PAST_BETS), diff --git a/web/components/layout/tabs.tsx b/web/components/layout/tabs.tsx index b9807802..deff2203 100644 --- a/web/components/layout/tabs.tsx +++ b/web/components/layout/tabs.tsx @@ -4,13 +4,13 @@ import { ReactNode, useState } from 'react' import { track } from '@amplitude/analytics-browser' import { Col } from './col' import { Tooltip } from 'web/components/tooltip' +import { Row } from 'web/components/layout/row' type Tab = { title: string - tabIcon?: ReactNode content: ReactNode - // If set, show a badge with this content - badge?: string + stackedTabIcon?: ReactNode + inlineTabIcon?: ReactNode tooltip?: string } @@ -58,13 +58,15 @@ export function ControlledTabs(props: TabProps & { activeIndex: number }) { )} aria-current={activeIndex === i ? 'page' : undefined} > - {tab.badge ? ( - {tab.badge} - ) : null} - {tab.tabIcon &&
{tab.tabIcon}
} - {tab.title} + {tab.stackedTabIcon && ( + {tab.stackedTabIcon} + )} + + {tab.title} + {tab.inlineTabIcon} +
diff --git a/web/components/user-page.tsx b/web/components/user-page.tsx index fde75607..aa3c06bc 100644 --- a/web/components/user-page.tsx +++ b/web/components/user-page.tsx @@ -192,7 +192,7 @@ export function UserPage(props: { user: User }) { tabs={[ { title: 'Markets', - tabIcon: , + stackedTabIcon: , content: ( <> @@ -202,7 +202,7 @@ export function UserPage(props: { user: User }) { }, { title: 'Portfolio', - tabIcon: , + stackedTabIcon: , content: ( <> @@ -214,7 +214,7 @@ export function UserPage(props: { user: User }) { }, { title: 'Comments', - tabIcon: , + stackedTabIcon: , content: ( <>