Skip to content

Commit

Permalink
Merge pull request #219 from SystemConsultantGroup/develop
Browse files Browse the repository at this point in the history
[FIX] 프로젝트 관련 에러 수정
  • Loading branch information
shj1081 authored Feb 10, 2025
2 parents 021d946 + 2358de0 commit dcaddd0
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 4 deletions.
15 changes: 15 additions & 0 deletions src/components/common/Header/Header.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,21 @@
}
}

.overlay {
position: fixed;
top: auto;
left: 0;
width: 100%;
height: 100%;
background-color: transparent;
z-index: 9;

display: none;
}
.overlay.show {
display: block;
}

.shortcuts {
display: flex;
flex-direction: row;
Expand Down
21 changes: 18 additions & 3 deletions src/components/common/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,24 @@ export function Header() {
<HeaderTopNav setIsOpen={setIsOpen} />
<HeaderToolBar isOpen={isOpen} setIsOpen={setIsOpen} />
</div>
<div className={`${styles.handout} ${isOpen ? styles.show : ""}`}>
<HandoutOverview setIsOpen={setIsOpen} />
</div>

<>
{/* handout 컨테이너 영역 클릭 시 창 닫기 */}
<div
className={`${styles.handout} ${isOpen ? styles.show : ""}`}
onClick={() => setIsOpen(false)}
>
{/* content 영역 클릭 이벤트 차단 */}
<div onClick={(e) => e.stopPropagation()}>
<HandoutOverview setIsOpen={setIsOpen} />
</div>
</div>
{/* handout 아래 overlay 영역 클릭 시 창 닫기 */}
<div
className={`${styles.overlay} ${isOpen ? styles.show : ""}`}
onClick={() => setIsOpen(false)}
/>
</>
</>
);
}
9 changes: 8 additions & 1 deletion src/components/common/ProjectCard/ProjectCardLikeSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
IconThumbUpFilled,
} from "@tabler/icons-react";
import classes from "./ProjectCard.module.css";
import { useState } from "react";
import { useEffect, useState } from "react";
import { useAuth } from "../Auth";

export interface ProjectCardLikeSectionProps {
Expand Down Expand Up @@ -49,6 +49,13 @@ export function ProjectCardLikeSection({
alert("프로젝트를 북마크에 추가하려면 로그인해야 합니다.");
}
};

useEffect(() => {
setLike(likes);
setIsLike(isLiked);
setIsMark(isMarked);
}, [likes, isLiked, isMarked]);

return (
<CardSection className={classes["like-section"]}>
<Group align="center" justify="space-between" p="8px 16px">
Expand Down
12 changes: 12 additions & 0 deletions src/components/common/SubHeadNavbar/SubHeadNavbar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,15 @@
display: none; /* 모바일 화면에서 숨김 */
}
}

/* 다크모드 색상 */
@media (prefers-color-scheme: dark) {
.navbar {
background-color: #2e3135;
color: #ffffff;
}

.navitem a {
color: #ffffff;
}
}
2 changes: 2 additions & 0 deletions src/components/pages/ProjectDetail/ProjectDetailInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ export function ProjectDetailInfo({ projectId }: Props) {
fetchProject();
}, [projectId, handleRefresh]);

useEffect(() => {}, [isThumbup, isInterest]);

const fetchImages = (thumbnailId: number, posterId: number) => {
if (thumbnailId) {
getFileUrlById(thumbnailId)
Expand Down

0 comments on commit dcaddd0

Please sign in to comment.