mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 06:20:24 +00:00
fix: BotCard button component rendered as Tag
This commit is contained in:
parent
c25d60eeef
commit
afc8e2e2dd
@ -10,23 +10,25 @@ import DiscordAvatar from '@components/DiscordAvatar'
|
|||||||
|
|
||||||
const BotCard = ({ manage = false, bot }: BotProps): JSX.Element => {
|
const BotCard = ({ manage = false, bot }: BotProps): JSX.Element => {
|
||||||
return (
|
return (
|
||||||
<div className='container mb-16 transform hover:-translate-y-1 transition duration-100 ease-in'>
|
<Link href={makeBotURL(bot)}>
|
||||||
<div className='relative'>
|
<a>
|
||||||
<div className='container mx-auto'>
|
<div className='container mb-16 transform hover:-translate-y-1 transition duration-100 ease-in cursor-pointer'>
|
||||||
<div className='h-full'>
|
<div className='relative'>
|
||||||
<div
|
<div className='container mx-auto'>
|
||||||
className='relative mx-auto h-full text-black dark:text-white dark:bg-discord-black bg-little-white rounded-2xl shadow-xl'
|
<div className='h-full'>
|
||||||
style={
|
<div
|
||||||
checkBotFlag(bot.flags, 'trusted') && bot.banner
|
className='relative mx-auto h-full text-black dark:text-white dark:bg-discord-black bg-little-white rounded-2xl shadow-xl'
|
||||||
? {
|
style={
|
||||||
background: `linear-gradient(to right, rgba(34, 36, 38, 0.68), rgba(34, 36, 38, 0.68)), url("${bot.banner}") center top / cover no-repeat`,
|
checkBotFlag(bot.flags, 'trusted') && bot.banner
|
||||||
color: 'white',
|
? {
|
||||||
|
background: `linear-gradient(to right, rgba(34, 36, 38, 0.68), rgba(34, 36, 38, 0.68)), url("${bot.banner}") center top / cover no-repeat`,
|
||||||
|
color: 'white',
|
||||||
|
}
|
||||||
|
: {}
|
||||||
}
|
}
|
||||||
: {}
|
>
|
||||||
}
|
|
||||||
>
|
|
||||||
<Link href={makeBotURL(bot)}>
|
|
||||||
<a className='cursor-pointer'>
|
|
||||||
<div className='flex h-44'>
|
<div className='flex h-44'>
|
||||||
<div className='w-3/5'>
|
<div className='w-3/5'>
|
||||||
<div className='flex justify-start'>
|
<div className='flex justify-start'>
|
||||||
@ -71,45 +73,48 @@ const BotCard = ({ manage = false, bot }: BotProps): JSX.Element => {
|
|||||||
))}{' '}
|
))}{' '}
|
||||||
{bot.category.length > 3 && <Tag text={`+${bot.category.length - 3}`} dark />}
|
{bot.category.length > 3 && <Tag text={`+${bot.category.length - 3}`} dark />}
|
||||||
</div>
|
</div>
|
||||||
</a>
|
|
||||||
</Link>
|
<Divider />
|
||||||
<Divider />
|
<div>
|
||||||
<div className='flex justify-evenly'>
|
<div className='flex justify-evenly'>
|
||||||
<Link href={makeBotURL(bot)}>
|
<Link href={makeBotURL(bot)}>
|
||||||
<a className='py-3 w-full text-center text-koreanbots-blue hover:text-white text-sm font-bold hover:bg-koreanbots-blue rounded-bl-2xl hover:shadow-lg transition duration-100 ease-in'>
|
<a className='py-3 w-full text-center text-koreanbots-blue hover:text-white text-sm font-bold hover:bg-koreanbots-blue rounded-bl-2xl hover:shadow-lg transition duration-100 ease-in'>
|
||||||
보기
|
보기
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
{manage ? (
|
{manage ? (
|
||||||
<Link href={`/manage/${bot.id}`}>
|
<Link href={`/manage/${bot.id}`}>
|
||||||
<a className='py-3 w-full text-center text-green-500 hover:text-white text-sm font-bold hover:bg-green-500 rounded-br-2xl hover:shadow-lg transition duration-100 ease-in'>
|
<a className='py-3 w-full text-center text-green-500 hover:text-white text-sm font-bold hover:bg-green-500 rounded-br-2xl hover:shadow-lg transition duration-100 ease-in'>
|
||||||
관리하기
|
관리하기
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
) : bot.state !== 'ok' ? <a
|
) : bot.state !== 'ok' ? <a
|
||||||
className='py-3 w-full text-center text-discord-blurple text-sm font-bold rounded-br-2xl hover:shadow-lg transition duration-100 ease-in opacity-50 cursor-default select-none'
|
className='py-3 w-full text-center text-discord-blurple text-sm font-bold rounded-br-2xl hover:shadow-lg transition duration-100 ease-in opacity-50 cursor-default select-none'
|
||||||
>
|
>
|
||||||
초대하기
|
초대하기
|
||||||
</a> : <Link
|
</a> : <Link
|
||||||
href={
|
href={
|
||||||
bot.url ||
|
bot.url ||
|
||||||
`https://discordapp.com/oauth2/authorize?client_id=${bot.id}&scope=bot&permissions=0`
|
`https://discordapp.com/oauth2/authorize?client_id=${bot.id}&scope=bot&permissions=0`
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
rel='noopener noreferrer'
|
rel='noopener noreferrer'
|
||||||
target='_blank'
|
target='_blank'
|
||||||
className='py-3 w-full text-center text-discord-blurple hover:text-white text-sm font-bold hover:bg-discord-blurple rounded-br-2xl hover:shadow-lg transition duration-100 ease-in'
|
className='py-3 w-full text-center text-discord-blurple hover:text-white text-sm font-bold hover:bg-discord-blurple rounded-br-2xl hover:shadow-lg transition duration-100 ease-in'
|
||||||
>
|
>
|
||||||
초대하기
|
초대하기
|
||||||
</a>
|
</a>
|
||||||
</Link>}
|
</Link>}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</a>
|
||||||
</div>
|
</Link>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user