Skip to content

Commit

Permalink
Merge pull request #133 from fastcampus-711/develop
Browse files Browse the repository at this point in the history
배포 최신화
  • Loading branch information
JeonYooDeok authored Jun 11, 2024
2 parents e34dd1d + ca5dd9e commit eb62cb9
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
10 changes: 9 additions & 1 deletion app/edit/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,15 @@ export default function Edit() {
<div className="max-w-[1200px] m-auto mb-40">
<div className="flex flex-col gap-10">
<div className="flex gap-4 items-center border-b border-grey_200 pt-8 pb-4">
<p className="text-grey_900 text-[32px] font-semibold">소통공간</p>
<p className="text-grey_900 text-[32px] font-semibold">
{category.value === "frees" ||
category.value === "markets" ||
category.value === "qna"
? "소통공간"
: category.value === "all" || category.value === "my"
? "민원게시판"
: null}
</p>
<div className="w-[1px] h-8 border-r border-grey_250"></div>
<p className="text-grey_700 text-2xl font-medium">
게시글 작성 페이지
Expand Down
28 changes: 27 additions & 1 deletion components/CommunitySearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function CommunitySearch({

setErrorMessage("")

if (category === "markets" || category === "complains") {
if (category === "markets") {
if (
keyword !== undefined &&
(status === undefined || status === "ALL" || status === "")
Expand Down Expand Up @@ -69,6 +69,32 @@ export default function CommunitySearch({
`/boards/${category}?catid=${catid}&keyword=${keyword}&status=${status}&page=1`
)
}
} else if (category === "all") {
if (
keyword !== undefined &&
(status === undefined || status === "ALL" || status === "")
) {
router.push(
`/complains/${category}?catid=${catid}&keyword=${keyword}&page=1`
)
} else {
router.push(
`/complains/${category}?catid=${catid}&keyword=${keyword}&status=${status}&page=1`
)
}
} else if (category === "my") {
if (
keyword !== undefined &&
(status === undefined || status === "ALL" || status === "")
) {
router.push(
`/complains/${category}?catid=${catid}&keyword=${keyword}&page=1`
)
} else {
router.push(
`/complains/${category}?catid=${catid}&keyword=${keyword}&status=${status}&page=1`
)
}
}
}

Expand Down

0 comments on commit eb62cb9

Please sign in to comment.