Skip to content

Commit 410dffd

Browse files
authored
Merge branch 'Team-Coverflow:develop' into feat/answer
2 parents 2c79669 + 2e26b94 commit 410dffd

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

src/components/pages/postPage/questionDetailPage.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ function QuestionDetailPage() {
307307

308308
if (response.error) {
309309
if (response.status === 409) {
310-
showErrorToast('답변이 달린 게시물은 삭제할 수 없습니다. ');
310+
showErrorToast('답변이 달린 게시물은 삭제할 수 없습니다.');
311311
return;
312312
}
313313
throw new Error('요청 처리 중 오류가 발생했습니다.');
@@ -412,7 +412,6 @@ function QuestionDetailPage() {
412412
<li onClick={handleClickEdit} className="dropdown-item-edit">
413413
수정
414414
</li>
415-
416415
<li onClick={handleClickDelete} className="dropdown-item-delete">
417416
삭제
418417
</li>

src/components/pages/searchPage/companyInfoPage.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ function CompanyInfoPage() {
189189
if (data) {
190190
setCompanyData(data.data);
191191
setTotalPages(data.data.totalPages);
192+
192193
setQuestionsCount(data.data.questionCount);
193194
} else {
194195
throw new Error('데이터가 존재하지 않습니다.');
@@ -324,6 +325,7 @@ function CompanyInfoPage() {
324325
reward={question.reward}
325326
companyData={companyData}
326327
viewCount={question.questionViewCount}
328+
questionCategory={question.questionCategory}
327329
/>
328330
))}
329331
</QuestionList>
@@ -343,6 +345,7 @@ function CompanyInfoPage() {
343345
reward={question.reward}
344346
companyData={companyData}
345347
viewCount={question.questionViewCount}
348+
questionCategory={question.questionCategory}
346349
/>
347350
))}
348351
</QuestionList>

src/components/ui/question/question.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ interface QuestionModulesProps {
7878
createAt: string;
7979
questionContent: string;
8080
reward: number;
81-
companyData: CompanInfoProps;
81+
companyData?: CompanInfoProps;
8282
viewCount: number;
83+
questionCategory?: string;
8384
}
8485

8586
function QuestionModule({
@@ -91,8 +92,8 @@ function QuestionModule({
9192
createAt,
9293
reward,
9394
questionerTag,
94-
companyData,
9595
viewCount,
96+
questionCategory,
9697
}: QuestionModulesProps) {
9798
const navigate = useNavigate();
9899

@@ -130,11 +131,7 @@ function QuestionModule({
130131
{truncateTitle(questionTitle)}
131132
</div>
132133
</div>
133-
<div className="category-select-style">
134-
{companyData?.questions?.map(
135-
(question) => question.questionCategory,
136-
)}
137-
</div>
134+
<div className="category-select-style">{questionCategory}</div>
138135
</div>
139136

140137
<div className="view-container">

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy