Add more bot tags, better creator name scaling
This commit is contained in:
parent
4f5c93be96
commit
c46c384d1d
|
@ -183,7 +183,6 @@ export function MarketSubheader(props: {
|
||||||
className="my-auto whitespace-nowrap"
|
className="my-auto whitespace-nowrap"
|
||||||
name={creatorName}
|
name={creatorName}
|
||||||
username={creatorUsername}
|
username={creatorUsername}
|
||||||
short={isMobile}
|
|
||||||
/>
|
/>
|
||||||
{/*<BadgeDisplay user={creator} />*/}
|
{/*<BadgeDisplay user={creator} />*/}
|
||||||
</Row>
|
</Row>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { SiteLink } from 'web/components/site-link'
|
import { SiteLink } from 'web/components/site-link'
|
||||||
import clsx from 'clsx'
|
import clsx from 'clsx'
|
||||||
|
import { useWindowSize } from 'web/hooks/use-window-size'
|
||||||
|
|
||||||
export function shortenName(name: string) {
|
export function shortenName(name: string) {
|
||||||
const firstName = name.split(' ')[0]
|
const firstName = name.split(' ')[0]
|
||||||
|
@ -24,10 +25,12 @@ export function UserLink(props: {
|
||||||
}) {
|
}) {
|
||||||
const { name, username, className, short, noLink } = props
|
const { name, username, className, short, noLink } = props
|
||||||
const shortName = short ? shortenName(name) : name
|
const shortName = short ? shortenName(name) : name
|
||||||
|
const { width } = useWindowSize()
|
||||||
return (
|
return (
|
||||||
<SiteLink
|
<SiteLink
|
||||||
href={`/${username}`}
|
href={`/${username}`}
|
||||||
className={clsx(
|
className={clsx(
|
||||||
|
(width ?? 0) < 450 ? ' max-w-[120px]' : 'max-w-[200px]',
|
||||||
'z-10 truncate',
|
'z-10 truncate',
|
||||||
className,
|
className,
|
||||||
noLink ? 'pointer-events-none' : ''
|
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() {
|
function BotBadge() {
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user