Skip to content

Commit

Permalink
Merge pull request #350 from HA-SEUNG-JEONG/bugFix/haseung
Browse files Browse the repository at this point in the history
μ—…μ’… μ΄μƒν•˜κ²Œ
  • Loading branch information
HA-SEUNG-JEONG committed May 29, 2024
2 parents 2dc47a5 + 471f196 commit 2e26b94
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/components/pages/postPage/questionDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ function QuestionDetailPage() {

if (response.error) {
if (response.status === 409) {
showErrorToast('닡변이 달린 κ²Œμ‹œλ¬Όμ€ μ‚­μ œν•  수 μ—†μŠ΅λ‹ˆλ‹€. ');
showErrorToast('닡변이 달린 κ²Œμ‹œλ¬Όμ€ μ‚­μ œν•  수 μ—†μŠ΅λ‹ˆλ‹€.');
return;
}
throw new Error('μš”μ²­ 처리 쀑 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€.');
Expand Down Expand Up @@ -412,7 +412,6 @@ function QuestionDetailPage() {
<li onClick={handleClickEdit} className="dropdown-item-edit">
μˆ˜μ •
</li>

<li onClick={handleClickDelete} className="dropdown-item-delete">
μ‚­μ œ
</li>
Expand Down
3 changes: 3 additions & 0 deletions src/components/pages/searchPage/companyInfoPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ function CompanyInfoPage() {
if (data) {
setCompanyData(data.data);
setTotalPages(data.data.totalPages);

setQuestionsCount(data.data.questionCount);
} else {
throw new Error('데이터가 μ‘΄μž¬ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.');
Expand Down Expand Up @@ -324,6 +325,7 @@ function CompanyInfoPage() {
reward={question.reward}
companyData={companyData}
viewCount={question.questionViewCount}
questionCategory={question.questionCategory}
/>
))}
</QuestionList>
Expand All @@ -343,6 +345,7 @@ function CompanyInfoPage() {
reward={question.reward}
companyData={companyData}
viewCount={question.questionViewCount}
questionCategory={question.questionCategory}
/>
))}
</QuestionList>
Expand Down
11 changes: 4 additions & 7 deletions src/components/ui/question/question.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ interface QuestionModulesProps {
createAt: string;
questionContent: string;
reward: number;
companyData: CompanInfoProps;
companyData?: CompanInfoProps;
viewCount: number;
questionCategory?: string;
}

function QuestionModule({
Expand All @@ -91,8 +92,8 @@ function QuestionModule({
createAt,
reward,
questionerTag,
companyData,
viewCount,
questionCategory,
}: QuestionModulesProps) {
const navigate = useNavigate();

Expand Down Expand Up @@ -130,11 +131,7 @@ function QuestionModule({
{truncateTitle(questionTitle)}
</div>
</div>
<div className="category-select-style">
{companyData?.questions?.map(
(question) => question.questionCategory,
)}
</div>
<div className="category-select-style">{questionCategory}</div>
</div>

<div className="view-container">
Expand Down

0 comments on commit 2e26b94

Please sign in to comment.