mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 06:20:24 +00:00
feat: added some badges
This commit is contained in:
parent
7c66eacf57
commit
de741c8977
@ -2,20 +2,24 @@ import { NextPage, NextPageContext } from 'next'
|
|||||||
import { SnowflakeUtil } from 'discord.js'
|
import { SnowflakeUtil } from 'discord.js'
|
||||||
import { Fetch } from '../../utils'
|
import { Fetch } from '../../utils'
|
||||||
import { ParsedUrlQuery } from 'querystring'
|
import { ParsedUrlQuery } from 'querystring'
|
||||||
import NotFound from '../404'
|
import { josa } from 'josa'
|
||||||
import { Bot, User } from '../../types'
|
import { Bot, User } from '../../types'
|
||||||
|
|
||||||
|
import NotFound from '../404'
|
||||||
import Container from '../../components/Container'
|
import Container from '../../components/Container'
|
||||||
import SEO from '../../components/SEO'
|
import SEO from '../../components/SEO'
|
||||||
import DiscordImage from '../../components/DiscordImage'
|
import DiscordImage from '../../components/DiscordImage'
|
||||||
import Divider from '../../components/Divider'
|
import Divider from '../../components/Divider'
|
||||||
import BotCard from '../../components/BotCard'
|
import BotCard from '../../components/BotCard'
|
||||||
import Tag from '../../components/Tag'
|
import Tag from '../../components/Tag'
|
||||||
|
import { checkPerm } from '../../utils/Tools'
|
||||||
const Users: NextPage<UserProps> = ({ data }) => {
|
const Users: NextPage<UserProps> = ({ data }) => {
|
||||||
if (!data.id) return <NotFound />
|
if (!data.id) return <NotFound />
|
||||||
return (
|
return (
|
||||||
<Container paddingTop className="py-10">
|
<Container paddingTop className="py-10">
|
||||||
<SEO
|
<SEO
|
||||||
title={data.username}
|
title={data.username}
|
||||||
|
description={josa(`${(data.bots as Bot[]).slice(0, 5).map(el=> el.name).join(', ')}#{을}`)}
|
||||||
image={
|
image={
|
||||||
data.avatar
|
data.avatar
|
||||||
? `https://cdn.discordapp.com/avatars/${data.id}/${data.avatar}.png?size=1024`
|
? `https://cdn.discordapp.com/avatars/${data.id}/${data.avatar}.png?size=1024`
|
||||||
@ -33,9 +37,20 @@ const Users: NextPage<UserProps> = ({ data }) => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex-grow px-5 py-12 w-full text-center lg:w-5/12 lg:text-left">
|
<div className="flex-grow px-5 py-12 w-full text-center lg:w-5/12 lg:text-left">
|
||||||
<div>
|
<div>
|
||||||
<h1 className="mb-2 mt-3 text-4xl font-bold">{data.username}</h1>
|
<h1 className="mb-2 mt-3 text-4xl font-bold">{data.username}</h1><span className="text-gray-400 text-4xl font-semibold ml-0.5">#{data.tag}</span>
|
||||||
<span className="text-gray-400 text-3xl font-semibold">#{data.tag}</span>
|
|
||||||
<br />
|
<br />
|
||||||
|
<div className='badges flex'>
|
||||||
|
{
|
||||||
|
checkPerm(data.perm, 'staff') && <div className='text-koreanbots-blue text-2xl pr-5'>
|
||||||
|
<i className='fas fa-hammer' />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
{
|
||||||
|
checkPerm(data.perm, 'bughunter') && <div className='text-green-400 text-2xl pr-5'>
|
||||||
|
<i className='fas fa-bug' />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
<br />
|
<br />
|
||||||
{data.github && (
|
{data.github && (
|
||||||
<Tag
|
<Tag
|
||||||
@ -45,7 +60,6 @@ const Users: NextPage<UserProps> = ({ data }) => {
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
github
|
github
|
||||||
circular
|
|
||||||
href={`https://github.com/${data.github}`}
|
href={`https://github.com/${data.github}`}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user