Skip to content

Commit dcaddd0

Browse files
authored
Merge pull request #219 from SystemConsultantGroup/develop
[FIX] 프로젝트 관련 에러 수정
2 parents 021d946 + 2358de0 commit dcaddd0

File tree

5 files changed

+55
-4
lines changed

5 files changed

+55
-4
lines changed

src/components/common/Header/Header.module.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,21 @@
386386
}
387387
}
388388

389+
.overlay {
390+
position: fixed;
391+
top: auto;
392+
left: 0;
393+
width: 100%;
394+
height: 100%;
395+
background-color: transparent;
396+
z-index: 9;
397+
398+
display: none;
399+
}
400+
.overlay.show {
401+
display: block;
402+
}
403+
389404
.shortcuts {
390405
display: flex;
391406
flex-direction: row;

src/components/common/Header/Header.tsx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,24 @@ export function Header() {
4040
<HeaderTopNav setIsOpen={setIsOpen} />
4141
<HeaderToolBar isOpen={isOpen} setIsOpen={setIsOpen} />
4242
</div>
43-
<div className={`${styles.handout} ${isOpen ? styles.show : ""}`}>
44-
<HandoutOverview setIsOpen={setIsOpen} />
45-
</div>
43+
44+
<>
45+
{/* handout 컨테이너 영역 클릭 시 창 닫기 */}
46+
<div
47+
className={`${styles.handout} ${isOpen ? styles.show : ""}`}
48+
onClick={() => setIsOpen(false)}
49+
>
50+
{/* content 영역 클릭 이벤트 차단 */}
51+
<div onClick={(e) => e.stopPropagation()}>
52+
<HandoutOverview setIsOpen={setIsOpen} />
53+
</div>
54+
</div>
55+
{/* handout 아래 overlay 영역 클릭 시 창 닫기 */}
56+
<div
57+
className={`${styles.overlay} ${isOpen ? styles.show : ""}`}
58+
onClick={() => setIsOpen(false)}
59+
/>
60+
</>
4661
</>
4762
);
4863
}

src/components/common/ProjectCard/ProjectCardLikeSection.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
IconThumbUpFilled,
99
} from "@tabler/icons-react";
1010
import classes from "./ProjectCard.module.css";
11-
import { useState } from "react";
11+
import { useEffect, useState } from "react";
1212
import { useAuth } from "../Auth";
1313

1414
export interface ProjectCardLikeSectionProps {
@@ -49,6 +49,13 @@ export function ProjectCardLikeSection({
4949
alert("프로젝트를 북마크에 추가하려면 로그인해야 합니다.");
5050
}
5151
};
52+
53+
useEffect(() => {
54+
setLike(likes);
55+
setIsLike(isLiked);
56+
setIsMark(isMarked);
57+
}, [likes, isLiked, isMarked]);
58+
5259
return (
5360
<CardSection className={classes["like-section"]}>
5461
<Group align="center" justify="space-between" p="8px 16px">

src/components/common/SubHeadNavbar/SubHeadNavbar.module.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,15 @@
5050
display: none; /* 모바일 화면에서 숨김 */
5151
}
5252
}
53+
54+
/* 다크모드 색상 */
55+
@media (prefers-color-scheme: dark) {
56+
.navbar {
57+
background-color: #2e3135;
58+
color: #ffffff;
59+
}
60+
61+
.navitem a {
62+
color: #ffffff;
63+
}
64+
}

src/components/pages/ProjectDetail/ProjectDetailInfo.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ export function ProjectDetailInfo({ projectId }: Props) {
9999
fetchProject();
100100
}, [projectId, handleRefresh]);
101101

102+
useEffect(() => {}, [isThumbup, isInterest]);
103+
102104
const fetchImages = (thumbnailId: number, posterId: number) => {
103105
if (thumbnailId) {
104106
getFileUrlById(thumbnailId)

0 commit comments

Comments
 (0)