diff --git a/pages/pickpickpick/[id]/apiHooks/comment/usePostPickComment.tsx b/pages/pickpickpick/[id]/apiHooks/comment/usePostPickComment.tsx index 53235294..e5d767c9 100644 --- a/pages/pickpickpick/[id]/apiHooks/comment/usePostPickComment.tsx +++ b/pages/pickpickpick/[id]/apiHooks/comment/usePostPickComment.tsx @@ -24,7 +24,7 @@ const postPickComment = async ({ pickId, contents, isPickVotePublic }: PostPickC return res.data; }; -export const usePostPickComment = () => { +export const usePostPickComment = ({ pickId }: { pickId: string }) => { const queryClient = useQueryClient(); const { setToastVisible } = useToastVisibleStore(); @@ -33,6 +33,7 @@ export const usePostPickComment = () => { onSuccess: async () => { await queryClient.invalidateQueries({ queryKey: ['pickCommentData'] }); await queryClient.invalidateQueries({ queryKey: ['getBestComments'] }); + await queryClient.invalidateQueries({ queryKey: ['getDetailPickData', pickId] }); setToastVisible({ message: '댓글을 성공적으로 작성했어요!', type: 'success' }); }, onError: (error: ErrorRespone) => { diff --git a/pages/pickpickpick/[id]/components/Comment.tsx b/pages/pickpickpick/[id]/components/Comment.tsx index c179848f..03519bb4 100644 --- a/pages/pickpickpick/[id]/components/Comment.tsx +++ b/pages/pickpickpick/[id]/components/Comment.tsx @@ -272,7 +272,8 @@ export default function Comment({
개발고민 혼자 끙끙 앓지말고,
diff --git a/pages/techblog/components/Comment.tsx b/pages/techblog/components/Comment.tsx
index cd1079ad..10094c0c 100644
--- a/pages/techblog/components/Comment.tsx
+++ b/pages/techblog/components/Comment.tsx
@@ -233,9 +233,9 @@ export default function Comment({
// 댓글 wrapper 스타일
const commentDefaultStyle =
- 'flex flex-col gap-[2.4rem] border-t-[0.1rem] border-t-gray400 pt-[2.4rem] pb-[3.2rem] px-[1.6rem]';
- const commentDesktopStyle = '';
- const commentMobileStyle = 'py-[3.2rem]';
+ 'flex flex-col gap-[2.4rem] border-t-[0.1rem] border-t-gray400 pt-[2.4rem] pb-[3.2rem]';
+ const commentDesktopStyle = 'px-[1.6rem]';
+ const commentMobileStyle = 'py-[3.2rem] px-0';
const subCommentDesktopStyle = 'bg-gray800 px-[3.2rem] border-t-gray500';
const subCommentMobileStyle = 'bg-gray800 px-[1.6rem] border-t-gray500';