This commit is contained in:
github-actions[bot] 2022-10-10 21:38:54 +00:00 committed by GitHub
commit fadb6c016e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 (