File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed
mypage/components/pages/my-active Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ function MyLike() {
88 const [ isLoading , setIsLoading ] = useState ( false ) ;
99
1010 const fetchLike = async ( ) => {
11- const res = await fetch ( `${ getApi } /me/likes/posts ` , {
11+ const res = await fetch ( `${ getApi } /me/likes` , {
1212 method : 'GET' ,
1313 credentials : 'include' ,
1414 } ) ;
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ function MyPost() {
1212 credentials : 'include' ,
1313 } ) ;
1414 const json = await res . json ( ) ;
15+ console . log ( json ) ;
1516 setMyPost ( json . data . items ) ;
1617 } ;
1718
Original file line number Diff line number Diff line change @@ -22,12 +22,11 @@ function RecipeComment({ cocktailId }: Props) {
2222 const { toastInfo } = useToast ( ) ;
2323
2424 const postRecipeComment = async ( cocktailId : number , content : string ) => {
25-
2625 if ( ! user ?. id ) {
27- toastInfo ( '로그인 후 이용 가능합니다' ) ;
28- return
26+ toastInfo ( '로그인 후 이용 가능합니다' ) ;
27+ return ;
2928 }
30-
29+
3130 try {
3231 const res = await fetch ( `${ getApi } /cocktails/${ cocktailId } /comments` , {
3332 method : 'POST' ,
@@ -36,10 +35,10 @@ function RecipeComment({ cocktailId }: Props) {
3635 body : JSON . stringify ( { content } ) ,
3736 } ) ;
3837 const text = await res . text ( ) ;
39-
40- if ( ! res . ok ) {
38+
39+ if ( ! res . ok ) {
4140 toastInfo ( '댓글은 한 개만 작성가능합니다' ) ;
42- return
41+ return ;
4342 }
4443
4544 const data = JSON . parse ( text ) ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ function DetailMain({ id }: { id: number }) {
3232
3333 if ( ! user ) {
3434 setIsKept ( false ) ;
35- return
35+ return ;
3636 } else {
3737 const keepRes = await fetch ( `${ getApi } /me/bar` , {
3838 method : 'GET' ,
You can’t perform that action at this time.
0 commit comments