Skip to content

Commit

Permalink
style: detail 페이지 카테고리 안보이게
Browse files Browse the repository at this point in the history
  • Loading branch information
hwan129 committed Aug 3, 2024
1 parent 9061327 commit 9c1f1b5
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions src/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,31 +127,32 @@ export default function Header({ mode }) {
</div>
</div>
{/* 프로젝트 이외에 경우에는 카테고리를 안보여줘도 됨 */}
{mode === 3 ? (
{/* detail 페이지도 */}
{mode === 3 || mode === 2 ? (
<></>
) : (
<div className="header-categoryContainer">
<div className="header-category" id="upper-category">
{Object.keys(categories).map((category) => (
<button
key={category}
onClick={() => handleCategoryClick(category)}
>
{category}
</button>
))}
</div>
{/* 프로젝트 전체 페이지일 경우 보여줌 */}
{mode === 1 ? (
<div className="header-category">
{categories[selectedCategory].map((option, index) => (
<button key={index}>{option}</button>
<div className="header-categoryContainer">
<div className="header-category" id="upper-category">
{Object.keys(categories).map((category) => (
<button
key={category}
onClick={() => handleCategoryClick(category)}
>
{category}
</button>
))}
</div>
) : (
<></>
)}
</div>
{/* 프로젝트 전체 페이지일 경우 보여줌 */}
{mode === 1 ? (
<div className="header-category">
{categories[selectedCategory].map((option, index) => (
<button key={index}>{option}</button>
))}
</div>
) : (
<></>
)}
</div>
)}
</div>
);
Expand Down

0 comments on commit 9c1f1b5

Please sign in to comment.