chore: added manage option for BotCard

This commit is contained in:
원더 2021-02-10 13:20:42 +09:00
parent bc7e0d7a4d
commit 93ee29b1b0

View File

@ -6,7 +6,7 @@ import Tag from './Tag'
import Link from 'next/link' import Link from 'next/link'
import DiscordAvatar from './DiscordAvatar' import DiscordAvatar from './DiscordAvatar'
const BotCard = ({ bot }: BotProps): JSX.Element => { const BotCard = ({ manage=false, bot }: BotProps): JSX.Element => {
return ( return (
<div className='container mb-20'> <div className='container mb-20'>
<div className='relative'> <div className='relative'>
@ -56,7 +56,14 @@ const BotCard = ({ bot }: BotProps): JSX.Element => {
</a> </a>
</Link> </Link>
{
manage ? <Link href={`/manage/${bot.id}`}>
<a <a
className='rounded-br-2xl py-3 w-full text-center text-green-500 hover:text-white text-sm font-bold hover:bg-green-500 hover:shadow-lg transition duration-100 ease-in'
>
</a>
</Link> : <a
rel='noopener noreferrer' rel='noopener noreferrer'
target='_blank' target='_blank'
href={ href={
@ -67,6 +74,7 @@ const BotCard = ({ bot }: BotProps): JSX.Element => {
> >
</a> </a>
}
</div> </div>
</div> </div>
</div> </div>
@ -77,6 +85,7 @@ const BotCard = ({ bot }: BotProps): JSX.Element => {
} }
interface BotProps { interface BotProps {
manage?: boolean
bot: Bot bot: Bot
} }