Skip to content

Commit 471f196

Browse files
Fixed : 업종 이상하게 뜨는 부분 수정
1 parent 0c5f74b commit 471f196

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

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