Skip to content

Commit

Permalink
fix: gatherWriting-memberCount-error (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeungJL authored Apr 24, 2024
2 parents fa27818 + 8f30009 commit d8738b4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ function GatherWritingConditionCnt({
}: IGatherWritingConditionCnt) {
const [isMaxLimit, setIsMaxLimit] = useState(defaultBoolean ?? !isMin);
const [number, setNumber] = useState(value);

useEffect(() => {
if (isMin) setMemberCnt((old) => ({ ...old, min: number }));
else setMemberCnt((old) => ({ ...old, max: number }));

// eslint-disable-next-line react-hooks/exhaustive-deps
}, [number]);

Expand Down
3 changes: 2 additions & 1 deletion pages/gather/writing/condition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function WritingCondition() {
);
const [isConfirmModal, setIsConfirmModal] = useState(false);


const isManager = ["manager", "previliged"].includes(session?.user.role);

const onClickNext = async () => {
Expand Down Expand Up @@ -121,7 +122,7 @@ function WritingCondition() {
<span>최대 인원</span>
</Name>
<GatherWritingConditionCnt
isMin={memberCnt.max !== 0}
isMin={false}
value={memberCnt.max}
setMemberCnt={setMemberCnt}
/>
Expand Down
8 changes: 8 additions & 0 deletions storage/notice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -692,4 +692,12 @@ export const NOTICE_ARR: INoticeArr[] = [
"시험기간 동안 두가지 컨텐츠와 이벤트를 진행합니다. 첫번째는 핸드폰을 멀리하고 공부 시간을 측정해주는 열품타를 이용하고, 두번째는 매주 2회 정도 디스코드에서 캠스터디를 진행합니다. 각 컨텐츠 모두 상품이 있고 자세한 내용은 톡방에서 공지할게요!",
date: "2023-04-15",
},
{
id: "88",
title: "시험기간 추가 이벤트",
category: "event",
content:
"시험기간 동안 힘내라고 각 지역 톡방에서 기프티콘을 뿌려요! 선착순 당첨입니다 ㅎㅎ",
date: "2023-04-22",
},
];

0 comments on commit d8738b4

Please sign in to comment.