Add more bot tags, better creator name scaling

This commit is contained in:
Ian Philips 2022-10-10 15:38:27 -06:00
parent 4f5c93be96
commit c46c384d1d
2 changed files with 10 additions and 2 deletions

View File

@ -183,7 +183,6 @@ export function MarketSubheader(props: {
className="my-auto whitespace-nowrap"
name={creatorName}
username={creatorUsername}
short={isMobile}
/>
{/*<BadgeDisplay user={creator} />*/}
</Row>

View File

@ -1,5 +1,6 @@
import { SiteLink } from 'web/components/site-link'
import clsx from 'clsx'
import { useWindowSize } from 'web/hooks/use-window-size'
export function shortenName(name: string) {
const firstName = name.split(' ')[0]
@ -24,10 +25,12 @@ export function UserLink(props: {
}) {
const { name, username, className, short, noLink } = props
const shortName = short ? shortenName(name) : name
const { width } = useWindowSize()
return (
<SiteLink
href={`/${username}`}
className={clsx(
(width ?? 0) < 450 ? ' max-w-[120px]' : 'max-w-[200px]',
'z-10 truncate',
className,
noLink ? 'pointer-events-none' : ''
@ -39,7 +42,13 @@ export function UserLink(props: {
)
}
const BOT_USERNAMES = ['v', 'ArbitrageBot']
const BOT_USERNAMES = [
'v',
'ArbitrageBot',
'MarketManagerBot',
'Botlab',
'JuniorBot',
]
function BotBadge() {
return (