mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
chore: not passing pwa at navbar
This commit is contained in:
parent
77196d057f
commit
f03ff02f88
@ -12,7 +12,7 @@ import { User, UserCache } from '@types'
|
||||
|
||||
const DiscordAvatar = dynamic(() => import('@components/DiscordAvatar'))
|
||||
|
||||
const Navbar: React.FC<NavbarProps> = ({ token, pwa }) => {
|
||||
const Navbar: React.FC<NavbarProps> = ({ token }) => {
|
||||
const [userCache, setUserCache] = useState<UserCache>()
|
||||
const [navbarOpen, setNavbarOpen] = useState<boolean>(false)
|
||||
const [dropdownOpen, setDropdownOpen] = useState<boolean>(false)
|
||||
@ -128,8 +128,7 @@ const Navbar: React.FC<NavbarProps> = ({ token, pwa }) => {
|
||||
<a tabIndex={0} onClick={()=> {
|
||||
localStorage.redirectTo = window.location.href
|
||||
setNavbarOpen(false)
|
||||
if(pwa) window.open('/api/auth/discord', '_blank')
|
||||
else redirectTo(router, 'login')
|
||||
redirectTo(router, 'login')
|
||||
}} className='lg:hover:text-gray-300 flex items-center px-3 py-4 w-full hover:text-gray-500 text-gray-700 text-sm font-semibold sm:w-auto lg:py-2 lg:text-gray-100 cursor-pointer outline-none'>
|
||||
로그인
|
||||
</a>
|
||||
@ -201,8 +200,7 @@ const Navbar: React.FC<NavbarProps> = ({ token, pwa }) => {
|
||||
</> : <a onClick={() => {
|
||||
localStorage.redirectTo = window.location.href
|
||||
setNavbarOpen(false)
|
||||
if(pwa) window.open('/api/auth/discord', '_blank')
|
||||
else redirectTo(router, 'login')
|
||||
redirectTo(router, 'login')
|
||||
}} className='flex items-center px-8 py-2 text-gray-100 hover:text-gray-300'>
|
||||
<i className='far fa-user' />
|
||||
<span className='px-2 font-medium'>로그인</span>
|
||||
@ -216,7 +214,6 @@ const Navbar: React.FC<NavbarProps> = ({ token, pwa }) => {
|
||||
|
||||
interface NavbarProps {
|
||||
token: string
|
||||
pwa: boolean
|
||||
}
|
||||
|
||||
export default Navbar
|
||||
|
||||
@ -125,7 +125,7 @@ const KoreanbotsApp = ({ Component, pageProps, err, cookie }: KoreanbotsProps):
|
||||
<meta name='screen-orientation' content='portrait' />
|
||||
|
||||
</Head>
|
||||
<Navbar token={cookie.token} pwa={standalone} />
|
||||
<Navbar token={cookie.token} />
|
||||
<div className='iu-is-the-best min-h-screen text-black dark:text-gray-100 dark:bg-discord-dark bg-white'>
|
||||
<Component {...pageProps} err={err} theme={theme} setTheme={setTheme} pwa={standalone} />
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user