mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
* feat: get display name on query * chore: use global_name instead of display_name * feat: show username on Owner * chore: remove unused import * feat: user page * chore: remove logging * feat: navbar * feat: Seo * feat: logging * feat: addbot * feat: security credit * feat: report * feat: transfer owner * feat: seo * feat: report * chore: do not get channel from guild * chore: remove displayname * chore: remove unused import
29 lines
1.0 KiB
TypeScript
29 lines
1.0 KiB
TypeScript
import Link from 'next/link'
|
|
import DiscordAvatar from '@components/DiscordAvatar'
|
|
|
|
const Owner: React.FC<OwnerProps> = ({ id, globalName, username, tag, crown=false }) => {
|
|
return (
|
|
<Link href={`/users/${id}`}>
|
|
<a className='dark:hover:bg-discord-dark-hover flex mb-1 px-4 py-4 text-black dark:text-gray-400 text-base dark:bg-discord-black bg-little-white hover:bg-little-white-hover rounded cursor-pointer'>
|
|
<div className='relative flex-shrink-0 mr-3 mt-1 w-8 h-8 rounded-full shadow-inner overflow-hidden'>
|
|
<DiscordAvatar userID={id} className='z-negative absolute inset-0 w-full h-full' />
|
|
</div>
|
|
<div className='flex-1 w-0 leading-snug'>
|
|
<h4 className='whitespace-nowrap truncate'>{ crown && <i className='fas fa-crown text-yellow-300 text-xs' /> }{globalName}</h4>
|
|
<span className='text-gray-600 text-sm'>{tag !== '0' ? '#' + tag : '@' + username}</span>
|
|
</div>
|
|
</a>
|
|
</Link>
|
|
)
|
|
}
|
|
|
|
export default Owner
|
|
|
|
interface OwnerProps {
|
|
id: string
|
|
username: string
|
|
tag: string
|
|
globalName: string
|
|
crown?: boolean
|
|
}
|