Compare commits

..

No commits in common. "8ab66a32852481354c798f4c5860ec9ef9ea0558" and "0d65b22bc67446715056d7279fcc8dd4ec324e72" have entirely different histories.

2 changed files with 6 additions and 8 deletions

View File

@ -116,15 +116,13 @@ const Bots: NextPage<BotsProps> = ({ data, desc, date, user, theme, csrfToken })
.
</p>
</Message>
) : data.enforcements.filter((i) => i !== 'NONE').length > 0 ? (
) : data.enforcements.length > 0 ? (
<Message type='warning'>
<h2 className='text-lg font-extrabold'> .</h2>
<p>
{data.enforcements
.filter((i) => i !== 'NONE')
.map((i) => (
<li key={i}>{botEnforcements[i].description}</li>
))}
{data.enforcements.map((i) => (
<li key={i}>{botEnforcements[i].description}</li>
))}
</p>
</Message>
) : (

View File

@ -641,7 +641,7 @@ async function submitBot(
git: data.git,
url: data.url,
category: JSON.stringify(data.category),
enforcements: JSON.stringify(data.enforcements),
enforcements: JSON.stringify(data.enforcements.filter((el) => el !== 'NONE')),
discord: data.discord,
state: 0,
})
@ -751,7 +751,7 @@ async function updateBot(id: string, data: ManageBot): Promise<number> {
intro: data.intro,
desc: data.desc,
vanity: data.vanity,
enforcements: JSON.stringify(data.enforcements),
enforcements: JSON.stringify(data.enforcements.filter((el) => el !== 'NONE')),
banner: data.banner,
bg: data.bg,
})