Skip to content

Commit

Permalink
Fix: when fetching similar articles, filter them by the ageGroup of t…
Browse files Browse the repository at this point in the history
…he current one
  • Loading branch information
georgipavlov-7DIGIT committed Nov 4, 2024
1 parent 5915cd9 commit 7dbec65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/ArticleInformation/ArticleInformation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export const ArticleInformation = () => {
articleIdToFetch,
i18n.language
);

const finalData = destructureArticleData(data);
return finalData;
};
Expand All @@ -60,6 +59,7 @@ export const ArticleInformation = () => {
excludeId: articleData.id,
populate: true,
ids: articleIdsQuerry.data,
ageGroupId: articleData.ageGroupId,
});

if (data.length === 0) {
Expand All @@ -71,6 +71,7 @@ export const ArticleInformation = () => {
excludeId: articleData.id,
populate: true,
ids: articleIdsQuerry.data,
ageGroupId: articleData.ageGroupId,
});
return newest.data;
}
Expand Down

0 comments on commit 7dbec65

Please sign in to comment.