Skip to content

Commit

Permalink
Fix: 게시물 상세조회 staleTime 수정 및 공개/비공개 토글 기본값 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ParkSohyunee committed Nov 28, 2024
1 parent 5338c93 commit abb4abb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/app/admin/notice/_components/NoticeItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ function NoticeDetailModal({ noticeId }: NoticeDetailModalProps) {
const { data: notices } = useQuery<NoticeDetailType>({
queryKey: [QUERY_KEYS.getNoticeDetail],
queryFn: () => getNoticeDetail(noticeId),
staleTime: 1000 * 60 * 30,
enabled: !!noticeId,
});

Expand Down Expand Up @@ -83,9 +82,9 @@ function NoticeItem({ notice }: NoticeItemProps) {
</button>
</td>
<td>
<select onChange={handleTogglePublic}>
<option>{notice.isExposed ? '공개' : '비공개'}</option>
<option>{notice.isExposed ? '비공개' : '공개'}</option>
<select onChange={handleTogglePublic} value={notice.isExposed ? '공개' : '비공개'}>
<option>공개</option>
<option>비공개</option>
</select>
</td>
</tr>
Expand Down

0 comments on commit abb4abb

Please sign in to comment.