From b68416af612a95608a94d31f3f93cb6f212a505d Mon Sep 17 00:00:00 2001 From: HA-SEUNG-JEONG Date: Wed, 8 May 2024 23:38:21 +0900 Subject: [PATCH 1/4] =?UTF-8?q?style=20:=20svg=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/asset/image/chat.svg | 8 +++----- src/asset/image/view.svg | 6 +++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/asset/image/chat.svg b/src/asset/image/chat.svg index e6081860..2254424e 100644 --- a/src/asset/image/chat.svg +++ b/src/asset/image/chat.svg @@ -1,5 +1,3 @@ - - - - - + + + \ No newline at end of file diff --git a/src/asset/image/view.svg b/src/asset/image/view.svg index 127bfaab..8c8f3cb1 100644 --- a/src/asset/image/view.svg +++ b/src/asset/image/view.svg @@ -1,4 +1,4 @@ - - - + + + \ No newline at end of file From 05ee98fb40217b51168b6966a61d407009ecc9ea Mon Sep 17 00:00:00 2001 From: HA-SEUNG-JEONG Date: Wed, 8 May 2024 23:39:14 +0900 Subject: [PATCH 2/4] =?UTF-8?q?fix=20:=20=EC=88=98=EC=A0=95/=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=20=EB=AA=A8=EB=8B=AC=20=EC=A0=9C=EB=8C=80=EB=A1=9C=20?= =?UTF-8?q?=EC=95=88=EB=9C=A8=EB=8A=94=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/pages/postPage/questionDetailPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/pages/postPage/questionDetailPage.tsx b/src/components/pages/postPage/questionDetailPage.tsx index 49262390..c2b69ef8 100644 --- a/src/components/pages/postPage/questionDetailPage.tsx +++ b/src/components/pages/postPage/questionDetailPage.tsx @@ -49,7 +49,7 @@ const QuestionTitle = styled.div` text-align: start; padding: 1% 0 1% 1.5%; color: #000000; - margin: 1rem 0 2% 3%; + margin: 2% 0 -1.5% 3%; overflow: visible; white-space: normal; width: 500px; @@ -59,6 +59,7 @@ const QuestionTitle = styled.div` align-items: flex-start; img { cursor: pointer; + margin: 3.7% 0 0 2%; } `; @@ -203,8 +204,7 @@ function QuestionDetailPage() { const res = await fetchAPI('/api/member/me', 'GET'); if (res.data.nickname === questionerNickname) { - setIsShowEdit(true); - setIsShowReport(false); + setIsShowEdit((isShow) => !isShow); } else if (res.data.nickname !== questionerNickname) { setIsShowReport((showReport) => !showReport); } From 74e4fd250231c1b857f433c1c4069cd60d4b4d72 Mon Sep 17 00:00:00 2001 From: HA-SEUNG-JEONG Date: Wed, 8 May 2024 23:39:31 +0900 Subject: [PATCH 3/4] =?UTF-8?q?style=20:=20cursor=20pointer=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/asset/sass/etc/question/answer.scss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/asset/sass/etc/question/answer.scss b/src/asset/sass/etc/question/answer.scss index fb7cdd11..4569ca34 100644 --- a/src/asset/sass/etc/question/answer.scss +++ b/src/asset/sass/etc/question/answer.scss @@ -9,7 +9,6 @@ border-radius: 10px; :nth-child(1) { - font-weight: bold; margin: 0px 6px 0 0; } @@ -129,4 +128,7 @@ .answer-container-info { display: flex; justify-content: space-between; + img { + cursor: pointer; + } } From 5ea875daa524acc4b457963ce8895fe804ab894b Mon Sep 17 00:00:00 2001 From: HA-SEUNG-JEONG Date: Wed, 8 May 2024 23:49:30 +0900 Subject: [PATCH 4/4] =?UTF-8?q?feat=20:=20=EC=B9=B4=ED=85=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=20=EB=AF=B8=EC=84=A0=ED=83=9D=20=EC=8B=9C=20=EC=A0=84?= =?UTF-8?q?=EC=B2=B4=20=EC=A7=88=EB=AC=B8=20=EC=A1=B0=ED=9A=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/asset/sass/etc/header/userInfoHeader.scss | 5 ++- .../pages/searchPage/companyInfoPage.tsx | 39 +++++++++++-------- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/asset/sass/etc/header/userInfoHeader.scss b/src/asset/sass/etc/header/userInfoHeader.scss index ffbe150b..65a2bf57 100644 --- a/src/asset/sass/etc/header/userInfoHeader.scss +++ b/src/asset/sass/etc/header/userInfoHeader.scss @@ -100,8 +100,9 @@ img.loginuser { border-radius: 10px; border-color: #d9d9d9; - margin-left: 82%; - margin-top: -3%; + // margin-left: 82%; + // margin-top: -3%; + left: 78%; } .dropdown-item { diff --git a/src/components/pages/searchPage/companyInfoPage.tsx b/src/components/pages/searchPage/companyInfoPage.tsx index b863f8ae..d8ddc53a 100644 --- a/src/components/pages/searchPage/companyInfoPage.tsx +++ b/src/components/pages/searchPage/companyInfoPage.tsx @@ -106,8 +106,9 @@ export interface CompanInfoProps { function CompanyInfoPage() { const navigate = useNavigate(); const [companyData, setCompanyData] = useState(); + const { companyId } = useParams(); - const [questionsCount, setQuestionCount] = useState(0); + const [questionsCount, setQuestionsCount] = useState(0); const [currentPage, setCurrentPage] = useState(0); const [totalPages, setTotalPages] = useState(0); @@ -138,24 +139,30 @@ function CompanyInfoPage() { setSelectedCategories( selectedCategories.filter((item) => item !== category), ); - } else { - setSelectedCategories([category]); - } - - try { + // 같은 카테고리를 중복해서 클릭했을 때는 `${BASE_URL}/api/company/${companyId}?pageNo=0&criterion=createdAt`으로 전체 질문 조회 const { data } = await axios.get( - `${BASE_URL}/api/company/${companyId}?pageNo=0&criterion=createdAt&questionTag=${selectedCategory}`, + `${BASE_URL}/api/company/${companyId}?pageNo=0&criterion=createdAt`, ); - if (data) { - setCompanyData(data.data); - setQuestionCount(data.data.totalElements); - } else { - throw new Error('데이터가 존재하지 않습니다.'); + setQuestionsCount(data.data.questionCount); + } else { + setSelectedCategories([...selectedCategories, category]); + + try { + const { data } = await axios.get( + `${BASE_URL}/api/company/${companyId}?pageNo=0&criterion=createdAt&questionTag=${selectedCategory}`, + ); + + if (data) { + setCompanyData(data.data); + setQuestionsCount(data.data.totalElements); + } else { + throw new Error('데이터가 존재하지 않습니다.'); + } + } catch (error) { + if (error instanceof Error) showErrorToast(error.message); + navigate(-1); } - } catch (error) { - if (error instanceof Error) showErrorToast(error.message); - navigate(-1); } }; @@ -181,7 +188,7 @@ function CompanyInfoPage() { if (data) { setCompanyData(data.data); setTotalPages(data.data.totalPages); - setQuestionCount(data.data.questionCount); + setQuestionsCount(data.data.questionCount); } else { throw new Error('데이터가 존재하지 않습니다.'); }