, submitResult: UseFormSubmitResult) => {
const { values } = submitResult;
if (!values) return;
@@ -50,22 +52,22 @@ const Publish = () => {
},
{
onSuccess: () => {
- alert('글 작성 완료!');
- navigate(PATH.NOTICE(numStudyId));
+ alert('글을 작성했습니다. :D');
+ navigate(`../${PATH.NOTICE}`); // TODO: 생성한 게시글 상세 페이지로 이동
},
onError: () => {
- alert('글 작성 실패!');
+ alert('글을 작성하지 못했습니다. 다시 시도해주세요. :(');
},
},
);
};
if (isFetching) {
- return 유저 정보 가져오는중...
;
+ return 유저 정보 가져오는 중...
;
}
if (isError) {
- return 유저 정보를 가져오는도중 에러를 만났습니다
;
+ return 유저 정보를 가져오는 도중 에러가 발생했습니다.
;
}
return (
@@ -76,16 +78,11 @@ const Publish = () => {
-
- 돌아가기
-
+
+
+ 돌아가기
+
+
등록하기
diff --git a/frontend/src/pages/study-room-page/tabs/review-tab-panel/ReviewTabPanel.tsx b/frontend/src/pages/study-room-page/tabs/review-tab-panel/ReviewTabPanel.tsx
index e0973261d..3cfe38e49 100644
--- a/frontend/src/pages/study-room-page/tabs/review-tab-panel/ReviewTabPanel.tsx
+++ b/frontend/src/pages/study-room-page/tabs/review-tab-panel/ReviewTabPanel.tsx
@@ -1,4 +1,5 @@
import { useEffect } from 'react';
+import { useParams } from 'react-router-dom';
import { useGetStudyReviews } from '@api/reviews';
@@ -7,14 +8,13 @@ import { useUserInfo } from '@hooks/useUserInfo';
import Divider from '@components/divider/Divider';
import Wrapper from '@components/wrapper/Wrapper';
-import ReviewForm from '@study-room-page/tabs/review-tab-panel/components/reivew-form/ReviewForm';
-import ReviewComment from '@study-room-page/tabs/review-tab-panel/components/review-comment/ReviewComment';
+import ReviewForm from '@review-tab/components/reivew-form/ReviewForm';
+import ReviewComment from '@review-tab/components/review-comment/ReviewComment';
-export type ReviewTabPanelProps = {
- studyId: number;
-};
+const ReviewTabPanel: React.FC = () => {
+ const { studyId: _studyId } = useParams<{ studyId: string }>();
+ const studyId = Number(_studyId);
-const ReviewTabPanel: React.FC = ({ studyId }) => {
const { data, isFetching, refetch, isError, isSuccess } = useGetStudyReviews({ studyId });
const { userInfo, fetchUserInfo } = useUserInfo();
diff --git a/frontend/src/pages/study-room-page/tabs/review-tab-panel/components/reivew-form/ReviewForm.stories.tsx b/frontend/src/pages/study-room-page/tabs/review-tab-panel/components/reivew-form/ReviewForm.stories.tsx
index 68023c1b0..52d8ff3d1 100644
--- a/frontend/src/pages/study-room-page/tabs/review-tab-panel/components/reivew-form/ReviewForm.stories.tsx
+++ b/frontend/src/pages/study-room-page/tabs/review-tab-panel/components/reivew-form/ReviewForm.stories.tsx
@@ -1,7 +1,7 @@
import type { Story } from '@storybook/react';
-import type { ReviewFormProps } from '@study-room-page/tabs/review-tab-panel/components/reivew-form/ReviewForm';
-import ReviewForm from '@study-room-page/tabs/review-tab-panel/components/reivew-form/ReviewForm';
+import type { ReviewFormProps } from '@review-tab/components/reivew-form/ReviewForm';
+import ReviewForm from '@review-tab/components/reivew-form/ReviewForm';
export default {
title: 'Pages/StudyRoomPage/ReviewForm',
diff --git a/frontend/src/pages/study-room-page/tabs/review-tab-panel/components/review-comment/ReviewComment.stories.tsx b/frontend/src/pages/study-room-page/tabs/review-tab-panel/components/review-comment/ReviewComment.stories.tsx
index 2e98db98b..d9305e593 100644
--- a/frontend/src/pages/study-room-page/tabs/review-tab-panel/components/review-comment/ReviewComment.stories.tsx
+++ b/frontend/src/pages/study-room-page/tabs/review-tab-panel/components/review-comment/ReviewComment.stories.tsx
@@ -1,7 +1,7 @@
import type { Story } from '@storybook/react';
-import type { ReviewCommentProps } from '@study-room-page/tabs/review-tab-panel/components/review-comment/ReviewComment';
-import ReviewComment from '@study-room-page/tabs/review-tab-panel/components/review-comment/ReviewComment';
+import ReviewComment from '@review-tab/components/review-comment/ReviewComment';
+import type { ReviewCommentProps } from '@review-tab/components/review-comment/ReviewComment';
export default {
title: 'Pages/StudyRoomPage/ReviewComment',
diff --git a/frontend/src/pages/study-room-page/tabs/review-tab-panel/components/review-comment/ReviewComment.tsx b/frontend/src/pages/study-room-page/tabs/review-tab-panel/components/review-comment/ReviewComment.tsx
index 9898ce010..215277c4a 100644
--- a/frontend/src/pages/study-room-page/tabs/review-tab-panel/components/review-comment/ReviewComment.tsx
+++ b/frontend/src/pages/study-room-page/tabs/review-tab-panel/components/review-comment/ReviewComment.tsx
@@ -13,8 +13,8 @@ import Flex from '@components/flex/Flex';
import { KebabMenuIcon } from '@components/icons';
import UserInfoItem from '@components/user-info-item/UserInfoItem';
-import useReviewComment from '@study-room-page/tabs/review-tab-panel/components/review-comment/useReviewComment';
-import ReviewEditForm from '@study-room-page/tabs/review-tab-panel/components/review-edit-form/ReviewEditForm';
+import useReviewComment from '@review-tab/components/review-comment/useReviewComment';
+import ReviewEditForm from '@review-tab/components/review-edit-form/ReviewEditForm';
export type ReviewCommentProps = {
id: ReviewId;
diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json
index 561b93c01..b531db7ae 100644
--- a/frontend/tsconfig.json
+++ b/frontend/tsconfig.json
@@ -33,8 +33,10 @@
"@create-study-page/*": ["pages/create-study-page/*"],
"@edit-study-page/*": ["pages/edit-study-page/*"],
"@my-study-page/*": ["pages/my-study-page/*"],
- "@community-tab/*": ["pages/study-room-page/tabs/community-tab-panel/*"],
"@notice-tab/*": ["pages/study-room-page/tabs/notice-tab-panel/*"],
+ "@community-tab/*": ["pages/study-room-page/tabs/community-tab-panel/*"],
+ "@link-tab/*": ["pages/study-room-page/tabs/link-room-tab-panel/*"],
+ "@review-tab/*": ["pages/study-room-page/tabs/review-tab-panel/*"],
"@study-room-page/*": ["pages/study-room-page/*"],
"@login-redirect-page/*": ["pages/login-redirect-page/*"],
"@error-page/*": ["pages/error-page/*"],
diff --git a/frontend/webpack/webpack.common.js b/frontend/webpack/webpack.common.js
index 20e034f7f..0e62c0811 100644
--- a/frontend/webpack/webpack.common.js
+++ b/frontend/webpack/webpack.common.js
@@ -74,8 +74,10 @@ module.exports = {
'@edit-study-page': resolve(__dirname, '../src/pages/edit-study-page'),
'@my-study-page': resolve(__dirname, '../src/pages/my-study-page'),
'@study-room-page': resolve(__dirname, '../src/pages/study-room-page'),
- '@community-tab': resolve(__dirname, '../src/pages/study-room-page/tabs/community-tab-panel'),
'@notice-tab': resolve(__dirname, '../src/pages/study-room-page/tabs/notice-tab-panel'),
+ '@community-tab': resolve(__dirname, '../src/pages/study-room-page/tabs/community-tab-panel'),
+ '@link-tab': resolve(__dirname, '../src/pages/study-room-page/tabs/link-room-tab-panel'),
+ '@review-tab': resolve(__dirname, '../src/pages/study-room-page/tabs/review-tab-panel'),
'@error-page': resolve(__dirname, '../src/pages/error-page'),
'@login-redirect-page': resolve(__dirname, '../src/pages/login-redirect-page'),
'@layout': resolve(__dirname, '../src/layout'),
diff --git a/package-lock.json b/package-lock.json
deleted file mode 100644
index 3d6b772d9..000000000
--- a/package-lock.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "name": "2022-moamoa-2",
- "lockfileVersion": 2,
- "requires": true,
- "packages": {}
-}