mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 22:10:24 +00:00
chore: handling no bot
This commit is contained in:
parent
ed18292a46
commit
b6f4847a3d
@ -27,28 +27,38 @@ const Panel:NextPage<PanelProps> = ({ logged, user, submits }) => {
|
||||
}
|
||||
return <Container paddingTop className='pt-5 pb-10'>
|
||||
<SEO title='관리 패널' />
|
||||
<h1 className='text-3xl font-bold'>관리 패널</h1>
|
||||
<h1 className='text-4xl font-bold'>관리 패널</h1>
|
||||
<div className='mt-6'>
|
||||
<h2 className='text-2xl font-bold'>나의 봇</h2>
|
||||
<ResponsiveGrid>
|
||||
{
|
||||
(user.bots as Bot[]).map(bot=> <BotCard key={bot.id} bot={bot} manage />)
|
||||
}
|
||||
</ResponsiveGrid>
|
||||
<h2 className='text-3xl font-bold'>나의 봇</h2>
|
||||
{
|
||||
user.bots.length === 0 ? <h2 className='text-xl'>소유한 봇이 없습니다.</h2> :
|
||||
<ResponsiveGrid>
|
||||
{
|
||||
(user.bots as Bot[]).map(bot=> <BotCard key={bot.id} bot={bot} manage />)
|
||||
}
|
||||
</ResponsiveGrid>
|
||||
}
|
||||
</div>
|
||||
<div className='mt-6'>
|
||||
<h2 className='text-2xl font-bold'>봇 심사이력</h2>
|
||||
<p className='text-left text-gray-400 text-sm font-medium'>자세히 보려면 카드를 클릭하세요.</p>
|
||||
<div className='grid gap-4 2xl:grid-cols-4 lg:grid-cols-2 mt-12'>
|
||||
{
|
||||
submits.slice(0, submitLimit).map(el=> <SubmittedBotCard key={el.date} href={`/pendingBots/${el.id}/${el.date}`} submit={el} />)
|
||||
}
|
||||
</div>
|
||||
<h2 className='text-3xl font-bold'>봇 심사이력</h2>
|
||||
{
|
||||
submitLimit < submits.length && <div className='text-center pt-4'>
|
||||
<Button onClick={() => setSubmitLimit(submitLimit+8)}>더보기</Button>
|
||||
</div>
|
||||
submits.length === 0 ? <h2 className='text-xl'>심사이력이 없습니다.</h2> :
|
||||
<>
|
||||
<p className='text-left text-gray-400 text-sm font-medium'>자세히 보려면 카드를 클릭하세요.</p>
|
||||
|
||||
<div className='grid gap-4 2xl:grid-cols-4 lg:grid-cols-2 mt-12'>
|
||||
{
|
||||
submits.slice(0, submitLimit).map(el=> <SubmittedBotCard key={el.date} href={`/pendingBots/${el.id}/${el.date}`} submit={el} />)
|
||||
}
|
||||
</div>
|
||||
{
|
||||
submitLimit < submits.length && <div className='text-center pt-4'>
|
||||
<Button onClick={() => setSubmitLimit(submitLimit+8)}>더보기</Button>
|
||||
</div>
|
||||
}
|
||||
</>
|
||||
}
|
||||
|
||||
</div>
|
||||
</Container>
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ const Users: NextPage<UserProps> = ({ user, data, csrfToken, theme }) => {
|
||||
<Container paddingTop className='py-10'>
|
||||
<SEO
|
||||
title={data.username}
|
||||
description={josa(
|
||||
description={data.bots.length === 0 ? `${data.username}님의 프로필입니다.` : josa(
|
||||
`${(data.bots as Bot[])
|
||||
.slice(0, 5)
|
||||
.map(el => el.name)
|
||||
@ -171,11 +171,17 @@ const Users: NextPage<UserProps> = ({ user, data, csrfToken, theme }) => {
|
||||
</div>
|
||||
<Divider />
|
||||
<h2 className='mt-8 text-3xl font-bold'>제작한 봇</h2>
|
||||
<ResponsiveGrid>
|
||||
{(data.bots as Bot[]).map((bot: Bot) => (
|
||||
<BotCard key={bot.id} bot={bot} />
|
||||
))}
|
||||
</ResponsiveGrid>
|
||||
|
||||
{data.bots.length === 0 ? <h2 className='text-xl'>소유한 봇이 없습니다.</h2> :
|
||||
<ResponsiveGrid>
|
||||
{
|
||||
(data.bots as Bot[]).map((bot: Bot) => (
|
||||
<BotCard key={bot.id} bot={bot} />
|
||||
))
|
||||
}
|
||||
</ResponsiveGrid>
|
||||
}
|
||||
|
||||
<Advertisement />
|
||||
</Container>
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user