Compare commits

...

5 Commits

Author SHA1 Message Date
soyoka
e3e407af67 feat: remove scroll detection logic in Navbar 2025-04-26 23:06:28 +09:00
Soyoka
486481d5d0
Merge branch 'master' into feat/navbar-implement 2025-04-26 22:34:51 +09:00
Soyoka
6fad2e1369
chore: fix spacing in return link (#678) 2025-04-21 20:59:49 +09:00
Soyoka
7fb55148f2
fix: PC 레이아웃 네비게이션바 수정 (#677) 2025-04-20 18:28:09 +09:00
soyoka
c49085b0f2 fix: prevent navbar from scrolling with page 2025-04-18 16:39:17 +09:00
6 changed files with 48 additions and 56 deletions

View File

@ -51,20 +51,12 @@ const Navbar: React.FC<NavbarProps> = ({ token }) => {
setUserCache(null)
}
}, [token])
const [scrolled, setScrolled] = useState(false)
useEffect(() => {
const handleScroll = () => setScrolled(window.scrollY > 160)
window.addEventListener('scroll', handleScroll)
return () => window.removeEventListener('scroll', handleScroll)
}, [])
return (
<div className='fixed top-0 left-0 right-0 z-50'>
<nav className={`fixed top-0 z-40 flex w-full flex-wrap items-center justify-between px-2 py-2 text-gray-100 transition-colors duration-300 backdrop-blur-sm ${
scrolled || dev ? 'bg-discord-blurple dark:bg-discord-black' : 'bg-discord-blurple/30 dark:bg-discord-black/30'
dev ? 'bg-discord-blurple dark:bg-discord-black' : 'bg-discord-blurple/30 dark:bg-discord-black/30'
} lg:absolute`}>
<div className='container mx-auto flex flex-wrap items-center justify-between px-4'>
<div className='relative flex w-full justify-between lg:w-auto lg:justify-start'>
<Link

View File

@ -1,7 +1,7 @@
import { NextPage } from 'next'
import Link from 'next/link'
import dynamic from 'next/dynamic'
import { Field, Form, Formik } from 'formik'
import { NextPage } from 'next'
import dynamic from 'next/dynamic'
import Link from 'next/link'
import { Bot, CsrfContext, ResponseProps, User } from '@types'
import { get } from '@utils/Query'
@ -9,15 +9,15 @@ import { makeBotURL, parseCookie } from '@utils/Tools'
import { ParsedUrlQuery } from 'querystring'
import NotFound from 'pages/404'
import { getToken } from '@utils/Csrf'
import { DMCA, TextField } from '@components/ReportTemplate'
import { useState } from 'react'
import { reportCats } from '@utils/Constants'
import { getToken } from '@utils/Csrf'
import Fetch from '@utils/Fetch'
import { ReportSchema } from '@utils/Yup'
import { getJosaPicker } from 'josa'
import { reportCats } from '@utils/Constants'
import { NextSeo } from 'next-seo'
import NotFound from 'pages/404'
import { useState } from 'react'
const Container = dynamic(() => import('@components/Container'))
const Message = dynamic(() => import('@components/Message'))

View File

@ -1,24 +1,24 @@
import { NextPage } from 'next'
import Link from 'next/link'
import dynamic from 'next/dynamic'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { Bot, CsrfContext, ResponseProps, Theme, User } from '@types'
import { get } from '@utils/Query'
import { makeBotURL, parseCookie, checkBotFlag } from '@utils/Tools'
import { checkBotFlag, makeBotURL, parseCookie } from '@utils/Tools'
import { ParsedUrlQuery } from 'querystring'
import NotFound from 'pages/404'
import { getToken } from '@utils/Csrf'
import Captcha from '@components/Captcha'
import { useEffect, useRef, useState } from 'react'
import Fetch from '@utils/Fetch'
import Day from '@utils/Day'
import { getJosaPicker } from 'josa'
import { KoreanbotsEndPoints } from '@utils/Constants'
import { NextSeo } from 'next-seo'
import SetNotification, { getFCMToken } from '@components/FCM'
import { KoreanbotsEndPoints } from '@utils/Constants'
import { getToken } from '@utils/Csrf'
import Day from '@utils/Day'
import Fetch from '@utils/Fetch'
import { getJosaPicker } from 'josa'
import { NextSeo } from 'next-seo'
import NotFound from 'pages/404'
import { useEffect, useRef, useState } from 'react'
const Container = dynamic(() => import('@components/Container'))
const DiscordAvatar = dynamic(() => import('@components/DiscordAvatar'))

View File

@ -1,23 +1,23 @@
import { NextPage } from 'next'
import Link from 'next/link'
import dynamic from 'next/dynamic'
import { Field, Form, Formik } from 'formik'
import { NextPage } from 'next'
import dynamic from 'next/dynamic'
import Link from 'next/link'
import { Server, CsrfContext, ResponseProps, User } from '@types'
import { CsrfContext, ResponseProps, Server, User } from '@types'
import { get } from '@utils/Query'
import { makeServerURL, parseCookie } from '@utils/Tools'
import { ParsedUrlQuery } from 'querystring'
import NotFound from 'pages/404'
import { getToken } from '@utils/Csrf'
import { DMCA, TextField } from '@components/ReportTemplate'
import { useState } from 'react'
import { serverReportCats } from '@utils/Constants'
import { getToken } from '@utils/Csrf'
import Fetch from '@utils/Fetch'
import { ReportSchema } from '@utils/Yup'
import { getJosaPicker } from 'josa'
import { serverReportCats } from '@utils/Constants'
import { NextSeo } from 'next-seo'
import NotFound from 'pages/404'
import { useState } from 'react'
const Container = dynamic(() => import('@components/Container'))
const Message = dynamic(() => import('@components/Message'))

View File

@ -1,24 +1,24 @@
import { NextPage } from 'next'
import Link from 'next/link'
import dynamic from 'next/dynamic'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { CsrfContext, ResponseProps, Server, Theme, User } from '@types'
import { get } from '@utils/Query'
import { parseCookie, checkServerFlag, makeServerURL } from '@utils/Tools'
import { checkServerFlag, makeServerURL, parseCookie } from '@utils/Tools'
import { ParsedUrlQuery } from 'querystring'
import NotFound from 'pages/404'
import { getToken } from '@utils/Csrf'
import Captcha from '@components/Captcha'
import { useEffect, useRef, useState } from 'react'
import Fetch from '@utils/Fetch'
import Day from '@utils/Day'
import { getJosaPicker } from 'josa'
import { KoreanbotsEndPoints } from '@utils/Constants'
import { NextSeo } from 'next-seo'
import SetNotification, { getFCMToken } from '@components/FCM'
import { KoreanbotsEndPoints } from '@utils/Constants'
import { getToken } from '@utils/Csrf'
import Day from '@utils/Day'
import Fetch from '@utils/Fetch'
import { getJosaPicker } from 'josa'
import { NextSeo } from 'next-seo'
import NotFound from 'pages/404'
import { useEffect, useRef, useState } from 'react'
const Container = dynamic(() => import('@components/Container'))
const ServerIcon = dynamic(() => import('@components/ServerIcon'))

View File

@ -1,7 +1,7 @@
import { NextPage } from 'next'
import Link from 'next/link'
import dynamic from 'next/dynamic'
import { Field, Form, Formik } from 'formik'
import { NextPage } from 'next'
import dynamic from 'next/dynamic'
import Link from 'next/link'
import { CsrfContext, ResponseProps, User } from '@types'
import { get } from '@utils/Query'
@ -9,15 +9,15 @@ import { makeUserURL, parseCookie } from '@utils/Tools'
import { ParsedUrlQuery } from 'querystring'
import NotFound from 'pages/404'
import { getToken } from '@utils/Csrf'
import { DMCA, TextField } from '@components/ReportTemplate'
import { useState } from 'react'
import { reportCats } from '@utils/Constants'
import { getToken } from '@utils/Csrf'
import Fetch from '@utils/Fetch'
import { ReportSchema } from '@utils/Yup'
import { getJosaPicker } from 'josa'
import { reportCats } from '@utils/Constants'
import { NextSeo } from 'next-seo'
import NotFound from 'pages/404'
import { useState } from 'react'
const Container = dynamic(() => import('@components/Container'))
const Message = dynamic(() => import('@components/Message'))