mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 14:30:22 +00:00
feat: using koreanbots cdn for og image
This commit is contained in:
parent
423e7201f8
commit
bc35577dc0
@ -9,7 +9,7 @@ import { SnowflakeUtil } from 'discord.js'
|
||||
import { ParsedUrlQuery } from 'querystring'
|
||||
import { Bot, ResponseProps, Theme, User } from '@types'
|
||||
|
||||
import { git, reportCats, Status } from '@utils/Constants'
|
||||
import { git, KoreanbotsEndPoints, reportCats, Status } from '@utils/Constants'
|
||||
import { get } from '@utils/Query'
|
||||
import Day from '@utils/Day'
|
||||
import { ReportSchema } from '@utils/Yup'
|
||||
@ -56,11 +56,7 @@ const Bots: NextPage<BotsProps> = ({ data, desc, date, user, theme, csrfToken })
|
||||
<SEO
|
||||
title={data.name}
|
||||
description={data.intro}
|
||||
image={
|
||||
data.avatar
|
||||
? `https://cdn.discordapp.com/avatars/${data.id}/${data.avatar}.png?size=1024`
|
||||
: `https://cdn.discordapp.com/embed/avatars/${Number(data.tag) % 5}.png?size=1024`
|
||||
}
|
||||
image={KoreanbotsEndPoints.CDN.avatar(data.id, { format: 'png', size: 256 })}
|
||||
/>
|
||||
{
|
||||
data.state === 'blocked' ? <div className='pb-40'>
|
||||
|
||||
@ -15,7 +15,7 @@ import Fetch from '@utils/Fetch'
|
||||
import { ReportSchema } from '@utils/Yup'
|
||||
|
||||
import NotFound from '../404'
|
||||
import { reportCats } from '@utils/Constants'
|
||||
import { KoreanbotsEndPoints, reportCats } from '@utils/Constants'
|
||||
|
||||
const Container = dynamic(() => import('@components/Container'))
|
||||
const SEO = dynamic(() => import('@components/SEO'))
|
||||
@ -50,11 +50,7 @@ const Users: NextPage<UserProps> = ({ user, data, csrfToken, theme }) => {
|
||||
.map(el => el.name)
|
||||
.join(', ')}#{을} 제작합니다.`
|
||||
)}
|
||||
image={
|
||||
data.avatar
|
||||
? `https://cdn.discordapp.com/avatars/${data.id}/${data.avatar}.png?size=1024`
|
||||
: `https://cdn.discordapp.com/embed/avatars/${Number(data.tag) % 5}.png?size=1024`
|
||||
}
|
||||
image={KoreanbotsEndPoints.CDN.avatar(data.id, { format: 'png', size: 256 })}
|
||||
/>
|
||||
<div className='lg:flex'>
|
||||
<div className='w-full text-center lg:w-1/4'>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user