mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 14:30:22 +00:00
chore: improved nsfw page
This commit is contained in:
parent
7d1262055b
commit
ed18292a46
@ -3,15 +3,23 @@ import dynamic from 'next/dynamic'
|
|||||||
const Button = dynamic(() => import('@components/Button'))
|
const Button = dynamic(() => import('@components/Button'))
|
||||||
const Container = dynamic(() => import('@components/Container'))
|
const Container = dynamic(() => import('@components/Container'))
|
||||||
|
|
||||||
const NSFW = ({ onClick }:NSFWProps): JSX.Element => {
|
const NSFW = ({ onClick, onDisableClick }:NSFWProps): JSX.Element => {
|
||||||
return <Container>
|
return <Container>
|
||||||
<div className='flex items-center h-screen select-none'>
|
<div className='flex items-center h-screen select-none'>
|
||||||
<div className='px-10'>
|
<div className='px-10'>
|
||||||
<h1 className='text-2xl font-bold'>해당 컨텐츠는 만19세 이상의 성인만 열람할 수 있습니다.</h1>
|
<h1 className='text-2xl font-bold flex'>
|
||||||
|
<img draggable='false' alt='⚠' src='https://twemoji.maxcdn.com/v/13.0.2/svg/26a0.svg' className='emoji mr-2 w-8' />
|
||||||
|
해당 컨텐츠는 만19세 이상의 성인만 열람할 수 있습니다.</h1>
|
||||||
<p className='text-lg mb-3'>계속하시겠습니까?</p>
|
<p className='text-lg mb-3'>계속하시겠습니까?</p>
|
||||||
<Button onClick={onClick}>
|
<Button onClick={onClick}>
|
||||||
<i className='fas fa-arrow-right' /> 계속하기
|
<i className='fas fa-arrow-right' /> 계속하기
|
||||||
</Button>
|
</Button>
|
||||||
|
<div className='mt-1'>
|
||||||
|
<button className='text-blue-500 hover:text-blue-600' onClick={() => {
|
||||||
|
onClick()
|
||||||
|
onDisableClick()
|
||||||
|
}}>다시 표시하지 않기.</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
@ -19,6 +27,7 @@ const NSFW = ({ onClick }:NSFWProps): JSX.Element => {
|
|||||||
|
|
||||||
interface NSFWProps {
|
interface NSFWProps {
|
||||||
onClick(): void
|
onClick(): void
|
||||||
|
onDisableClick(): void
|
||||||
}
|
}
|
||||||
|
|
||||||
export default NSFW
|
export default NSFW
|
||||||
@ -65,10 +65,8 @@ const Bots: NextPage<BotsProps> = ({ data, date, user, theme, csrfToken }) => {
|
|||||||
<h2 className='text-lg font-black'>해당 봇은 관리자에 의해 삭제되었습니다.</h2>
|
<h2 className='text-lg font-black'>해당 봇은 관리자에 의해 삭제되었습니다.</h2>
|
||||||
</Message>
|
</Message>
|
||||||
</div>
|
</div>
|
||||||
: data.category.includes('NSFW') && !nsfw ? <NSFW onClick={() => {
|
: data.category.includes('NSFW') && !nsfw ? <NSFW onClick={() => setNSFW(true)} onDisableClick={() => localStorage.nsfw = true} />
|
||||||
localStorage.nsfw = true
|
: <>
|
||||||
setNSFW(true)
|
|
||||||
}} /> : <>
|
|
||||||
<div className='w-full pb-2'>
|
<div className='w-full pb-2'>
|
||||||
{
|
{
|
||||||
data.state === 'private' ? <Message type='info'>
|
data.state === 'private' ? <Message type='info'>
|
||||||
|
|||||||
@ -24,10 +24,8 @@ const Category: NextPage<CategoryProps> = ({ data, query }) => {
|
|||||||
<Hero header={`${query.category} 카테고리 봇들`} description={`다양한 "${query.category}" 카테고리의 봇들을 만나보세요.`} />
|
<Hero header={`${query.category} 카테고리 봇들`} description={`다양한 "${query.category}" 카테고리의 봇들을 만나보세요.`} />
|
||||||
<SEO title={`${query.category} 카테고리 봇들`} description={`다양한 ${query.category} 카테고리의 봇들을 만나보세요.`} />
|
<SEO title={`${query.category} 카테고리 봇들`} description={`다양한 ${query.category} 카테고리의 봇들을 만나보세요.`} />
|
||||||
{
|
{
|
||||||
query.category === 'NSFW' && !nsfw ? <NSFW onClick={() => {
|
query.category === 'NSFW' && !nsfw ? <NSFW onClick={() => setNSFW(true)} onDisableClick={() => localStorage.nsfw = true} />
|
||||||
localStorage.nsfw = true
|
: <Container>
|
||||||
setNSFW(true)
|
|
||||||
}} /> : <Container>
|
|
||||||
<Advertisement />
|
<Advertisement />
|
||||||
<ResponsiveGrid>
|
<ResponsiveGrid>
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user