Skip to content

Commit

Permalink
Fix: #41 textarea contents 상태를 삭제하고 title에 따라 fetch하도록 useEffect deps 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
eve712 committed Jun 24, 2021
1 parent 9af8103 commit fcad256
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions FE/issue-tracker/src/components/newIssue/ButtonBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import { fetchWithAuth } from '@utils/fetchWithAuth';
import {
isInputtedTitleAtom,
isClickedCompleteBtnAtom,
newIssueContentsAtom,
newIssueTitleAtom,
} from '@store/atoms/newIssue';
import { getNewIssueBody } from '@store/selectors/newIssue';

function ButtonBox() {
const isInputtedTitle = useRecoilValue(isInputtedTitleAtom);
const newIssueContents = useRecoilValue(newIssueContentsAtom);
const newIssueTitle = useRecoilValue(newIssueTitleAtom);
const newIssueHeaderBody = useRecoilValue(getNewIssueBody);
const [isClickedCompleteBtn, setIsClickedCompleteBtn] = useRecoilState(
isClickedCompleteBtnAtom
Expand All @@ -39,7 +39,7 @@ function ButtonBox() {
}
};
postIssue();
}, [newIssueContents]);
}, [newIssueTitle]);

return (
<ButtonBoxWrap>
Expand Down

0 comments on commit fcad256

Please sign in to comment.