File tree 5 files changed +5
-68
lines changed
5 files changed +5
-68
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export default function DarkModeButton({ animate }: Props) {
14
14
return (
15
15
< motion . button
16
16
onClick = { toggleDarkMode }
17
- className = 'pointer-events-auto absolute flex h-[30px ] w-[30px ] items-center justify-center rounded-full hover:scale-110 '
17
+ className = 'pointer-events-auto flex h-[50px ] w-[50px ] items-center justify-center rounded-full hover:scale-150 '
18
18
animate = { animate } >
19
19
< Img
20
20
src = { FaviconImg }
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export default function NavbarCustomSelect() {
9
9
const { data = [ ] } = useGroupNames ( generation ) ;
10
10
const location = useLocation ( ) ;
11
11
const prevProjectGroupRef = useRef < string | null > ( null ) ;
12
- const projectGroup = location . pathname . split ( '/project/' ) [ 1 ] ;
12
+ const projectGroup = decodeURIComponent ( location . pathname . split ( '/project/' ) [ 1 ] ) ;
13
13
14
14
useEffect ( ( ) => {
15
15
if ( data . length > 0 && projectGroup !== prevProjectGroupRef . current ) {
Original file line number Diff line number Diff line change 1
- import FaviconImg from '@asset/image/Favicon.svg' ;
2
1
import H1 from '@component/atom/H1' ;
3
- import Img from '@component/atom/Img ' ;
2
+ import DarkModeButton from '@component/molecule/DarkModeButton ' ;
4
3
import { useNavigate } from 'react-router-dom' ;
5
4
6
5
export default function NavbarTitle ( ) {
@@ -12,8 +11,8 @@ export default function NavbarTitle() {
12
11
13
12
return (
14
13
< div className = 'my-2 w-full' >
15
- < div className = 'flex min-w-0 cursor-pointer items-center gap-2 ' onClick = { navigateMain } >
16
- < Img src = { FaviconImg } cssOption = 'w-[36px]' alt = '와치덕스 로고 이미지' />
14
+ < div className = 'flex min-w-0 cursor-pointer items-center' onClick = { navigateMain } >
15
+ < DarkModeButton />
17
16
< H1 cssOption = 'font-bold text-[1.6vw] truncate dark:text-white' content = 'WatchDucks' />
18
17
</ div >
19
18
</ div >
Original file line number Diff line number Diff line change 1
1
import CustomErrorBoundary from '@boundary/CustomErrorBoundary' ;
2
- import DarkModeButton from '@component/molecule/DarkModeButton' ;
3
2
import NavbarCustomSelect from '@component/molecule/NavbarCustomSelect' ;
4
3
import NavbarDefaultSelect from '@component/molecule/NavbarDefaultSelect' ;
5
4
import { PATH } from '@constant/Path' ;
6
- import { useDuckAnimation } from '@hook/useDarkModeAnimation' ;
7
5
import { useRef } from 'react' ;
8
6
import { useLocation } from 'react-router-dom' ;
9
7
10
8
export default function NavbarSelectWrapper ( ) {
11
9
const { pathname } = useLocation ( ) ;
12
10
const isProjectPath = pathname . includes ( PATH . PROJECT ) ;
13
11
const containerRef = useRef < HTMLDivElement > ( null ) ;
14
- const duckAnimation = useDuckAnimation ( { containerRef } ) ;
15
-
16
12
return (
17
13
< div className = 'relative mt-[8px] w-full' >
18
14
< div ref = { containerRef } >
@@ -24,9 +20,6 @@ export default function NavbarSelectWrapper() {
24
20
</ CustomErrorBoundary >
25
21
) }
26
22
</ div >
27
- < div className = 'pointer-events-none absolute left-0 top-0 h-full w-full' >
28
- < DarkModeButton animate = { duckAnimation } />
29
- </ div >
30
23
</ div >
31
24
) ;
32
25
}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments