Skip to content

Commit cfc973f

Browse files
authoredDec 4, 2024
Merge pull request #285 from boostcampwm-2024/dev-front
[FE] Merge to main
2 parents 2fe0209 + 874532e commit cfc973f

File tree

5 files changed

+5
-68
lines changed

5 files changed

+5
-68
lines changed
 

‎frontend/src/component/molecule/DarkModeButton.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function DarkModeButton({ animate }: Props) {
1414
return (
1515
<motion.button
1616
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'
1818
animate={animate}>
1919
<Img
2020
src={FaviconImg}

‎frontend/src/component/molecule/NavbarCustomSelect.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default function NavbarCustomSelect() {
99
const { data = [] } = useGroupNames(generation);
1010
const location = useLocation();
1111
const prevProjectGroupRef = useRef<string | null>(null);
12-
const projectGroup = location.pathname.split('/project/')[1];
12+
const projectGroup = decodeURIComponent(location.pathname.split('/project/')[1]);
1313

1414
useEffect(() => {
1515
if (data.length > 0 && projectGroup !== prevProjectGroupRef.current) {

‎frontend/src/component/molecule/NavbarTitle.tsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import FaviconImg from '@asset/image/Favicon.svg';
21
import H1 from '@component/atom/H1';
3-
import Img from '@component/atom/Img';
2+
import DarkModeButton from '@component/molecule/DarkModeButton';
43
import { useNavigate } from 'react-router-dom';
54

65
export default function NavbarTitle() {
@@ -12,8 +11,8 @@ export default function NavbarTitle() {
1211

1312
return (
1413
<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 />
1716
<H1 cssOption='font-bold text-[1.6vw] truncate dark:text-white' content='WatchDucks' />
1817
</div>
1918
</div>
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
import CustomErrorBoundary from '@boundary/CustomErrorBoundary';
2-
import DarkModeButton from '@component/molecule/DarkModeButton';
32
import NavbarCustomSelect from '@component/molecule/NavbarCustomSelect';
43
import NavbarDefaultSelect from '@component/molecule/NavbarDefaultSelect';
54
import { PATH } from '@constant/Path';
6-
import { useDuckAnimation } from '@hook/useDarkModeAnimation';
75
import { useRef } from 'react';
86
import { useLocation } from 'react-router-dom';
97

108
export default function NavbarSelectWrapper() {
119
const { pathname } = useLocation();
1210
const isProjectPath = pathname.includes(PATH.PROJECT);
1311
const containerRef = useRef<HTMLDivElement>(null);
14-
const duckAnimation = useDuckAnimation({ containerRef });
15-
1612
return (
1713
<div className='relative mt-[8px] w-full'>
1814
<div ref={containerRef}>
@@ -24,9 +20,6 @@ export default function NavbarSelectWrapper() {
2420
</CustomErrorBoundary>
2521
)}
2622
</div>
27-
<div className='pointer-events-none absolute left-0 top-0 h-full w-full'>
28-
<DarkModeButton animate={duckAnimation} />
29-
</div>
3023
</div>
3124
);
3225
}

‎frontend/src/hook/useDarkModeAnimation.ts

-55
This file was deleted.

0 commit comments

Comments
 (0)