Skip to content

Commit

Permalink
Merge pull request #321 from softeerbootcamp-2nd/bugfix/summary-optio…
Browse files Browse the repository at this point in the history
…ns-price

[FEAT] #316:  견적요약 옵션 가격 반영
  • Loading branch information
kimdaye77 authored Aug 19, 2023
2 parents 0bfba54 + de2ab6a commit 4792f16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/components/modal/QuoteSummaryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default function QuoteSummaryModal({ ...props }: IQuoteSummaryModal) {
const optionNames = selectedItem.options.map((option) => {
return option.name;
});
const optionPrice = selectedItem.options.reduce((acc, option) => acc + option.price, 0);

return (
<DimmedBackground $displayDimmed={visible} {...props}>
Expand Down Expand Up @@ -90,7 +91,7 @@ export default function QuoteSummaryModal({ ...props }: IQuoteSummaryModal) {
price={selectedItem.innerColor.price}
/>
<Hr />
<Detail title="옵션" name={optionNames.join(', ')} price={0} />
<Detail title="옵션" name={optionNames.join(', ')} price={optionPrice} />
</DetailSection>
</Row>
<PriceSection>
Expand Down

0 comments on commit 4792f16

Please sign in to comment.