mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 22:10:24 +00:00
feat: using discord avatar component
This commit is contained in:
parent
0e2c59a32b
commit
b53a3f412e
@ -4,6 +4,7 @@ import { Status } from '../utils/Constants'
|
|||||||
import Divider from './Divider'
|
import Divider from './Divider'
|
||||||
import Tag from './Tag'
|
import Tag from './Tag'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
import DiscordAvatar from './DiscordAvatar'
|
||||||
|
|
||||||
const BotCard = ({ bot }: BotProps): JSX.Element => {
|
const BotCard = ({ bot }: BotProps): JSX.Element => {
|
||||||
return (
|
return (
|
||||||
@ -15,16 +16,7 @@ const BotCard = ({ bot }: BotProps): JSX.Element => {
|
|||||||
<div className='flex h-44'>
|
<div className='flex h-44'>
|
||||||
<div className='w-2/3'>
|
<div className='w-2/3'>
|
||||||
<div className='flex justify-start'>
|
<div className='flex justify-start'>
|
||||||
<img
|
<DiscordAvatar size={128} userID={bot.id} avatarHash={bot.avatar} tag={bot.tag} alt='Avatar' className='rounded-full absolute -left-2 -top-8 mx-auto w-32 h-32 bg-white'/>
|
||||||
alt='Avatar'
|
|
||||||
src={
|
|
||||||
bot.avatar
|
|
||||||
? `https://cdn.discordapp.com/avatars/${bot.id}/${bot.avatar}.png?size=1024`
|
|
||||||
: `https://cdn.discordapp.com/embed/avatars/${Number(bot.tag) %
|
|
||||||
5}.png?size=1024`
|
|
||||||
}
|
|
||||||
className='rounded-full absolute -left-2 -top-8 mx-auto w-32 h-32 bg-white'
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='mt-28 px-4'>
|
<div className='mt-28 px-4'>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user