mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 14:30:22 +00:00
fix: menu not closing
close: https://github.com/koreanbots/v2-testing/issues/50
This commit is contained in:
parent
2fec571c77
commit
7270591718
@ -179,7 +179,7 @@ const Navbar = ({ token }:{ token: string }): JSX.Element => {
|
|||||||
strokeLinejoin='round'
|
strokeLinejoin='round'
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
<span className='px-2 font-medium'>소개</span>
|
<span onClick={() => setNavbarOpen(!navbarOpen)} className='px-2 font-medium'>소개</span>
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
<Link href='/addbot'>
|
<Link href='/addbot'>
|
||||||
@ -194,18 +194,19 @@ const Navbar = ({ token }:{ token: string }): JSX.Element => {
|
|||||||
{
|
{
|
||||||
logged ? <>
|
logged ? <>
|
||||||
<Link href={`/users/${userCache.id}`}>
|
<Link href={`/users/${userCache.id}`}>
|
||||||
<a className='flex items-center px-8 py-2 text-gray-100 hover:text-gray-300'>
|
<a className='flex items-center px-8 py-2 text-gray-100 hover:text-gray-300' onClick={() => setNavbarOpen(!navbarOpen)}>
|
||||||
<i className='far fa-user' />
|
<i className='far fa-user' />
|
||||||
<span className='px-2 font-medium'>{userCache.username}</span>
|
<span className='px-2 font-medium'>{userCache.username}</span>
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
<Link href='/panel'>
|
<Link href='/panel'>
|
||||||
<a className='flex items-center px-8 py-2 text-gray-100 hover:text-gray-300'>
|
<a className='flex items-center px-8 py-2 text-gray-100 hover:text-gray-300' onClick={() => setNavbarOpen(!navbarOpen)}>
|
||||||
<i className='fas fa-cogs' />
|
<i className='fas fa-cogs' />
|
||||||
<span className='px-2 font-medium'>관리패널</span>
|
<span className='px-2 font-medium'>관리패널</span>
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
<a onClick={()=> {
|
<a onClick={()=> {
|
||||||
|
setNavbarOpen(!navbarOpen)
|
||||||
localStorage.removeItem('userCache')
|
localStorage.removeItem('userCache')
|
||||||
redirectTo(router, 'logout')
|
redirectTo(router, 'logout')
|
||||||
}} className='flex items-center px-8 py-2 text-red-500 hover:text-red-400'>
|
}} className='flex items-center px-8 py-2 text-red-500 hover:text-red-400'>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user