Skip to content

Commit

Permalink
chore: 작성 버튼을 누를 경우 바텀시트 바로 닫히게 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
junghyunbak committed Nov 22, 2023
1 parent 7c1e3c8 commit f5b89f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pages/Write/WritePresenter/WriteGuide/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function WriteGuide({}: WriteGuideProps) {
}, []);

/**
* gpt
* gpt 일기 생성
*/
const createGptDiaryMutation = useMutation(
async (details: string) => {
Expand All @@ -78,8 +78,6 @@ export function WriteGuide({}: WriteGuideProps) {
},
{
onSuccess: (content: string) => {
bottomSheetRef.current?.snapToIndex(0);

console.log("[gpt가 생성한 일기]", content);

setValue("content", getValues("content") + content);
Expand Down Expand Up @@ -250,6 +248,8 @@ export function WriteGuide({}: WriteGuideProps) {
}
}

bottomSheetRef.current?.snapToIndex(0);

createGptDiaryMutation.mutate(sentenses.join("|"));

break;
Expand Down

0 comments on commit f5b89f5

Please sign in to comment.