Skip to content

Commit

Permalink
fix: Fixes presenters name bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Hossein-Asadi committed Jan 15, 2025
1 parent 89fd523 commit d49cca4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions frontend/src/components/item-card/item-card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,16 @@ const ItemCard = ({
startDate,
endDate,
presenterName,
certificateLink,
finished,
certificateLink,
finished,
level,
cost = 50000,
purchaseState = 0, // 0 -> not purchased, 1 -> in cart, 2 -> purchased
hasProject = false,
prerequisites,
syllabus,
remainingCapacity = 50,
capacity = 50,
remainingCapacity = 95,
capacity = 95,
isFull = false,
addToCalendarLink,
onClickAddToCart = () => {},
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/pages/workshops/useWorkshopsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ export default function useWorkshopsPage() {

useEffect(() => {
if (workshopsData == null || presentationsData == null || teachersData == null || presenterData == null) return;

let parsedData = workshopsData
.concat(presentationsData)
.map((workshop) => {
Expand All @@ -98,7 +97,7 @@ export default function useWorkshopsPage() {
});
} else {
workshop.presenters.forEach((item) => {
presenters.push(presenterData.filter((el) => el.id === item)?.[0]?.name);
presenters.push(teachersData.filter((el) => el.id === item)?.[0]?.name);
});
}
item.presenters = presenters;
Expand Down

0 comments on commit d49cca4

Please sign in to comment.