From 90c0d85d65256f5ef9bee19ec9f610ee3ccd91ce Mon Sep 17 00:00:00 2001 From: Aashish <83752052+120EE0692@users.noreply.github.com> Date: Sun, 24 Jul 2022 14:32:38 +0530 Subject: [PATCH] fix: get noOfArticle by articleList (#241) --- client/src/pages/portfolio/[userId]/[name].jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/pages/portfolio/[userId]/[name].jsx b/client/src/pages/portfolio/[userId]/[name].jsx index 5b9a3e69..289ace81 100644 --- a/client/src/pages/portfolio/[userId]/[name].jsx +++ b/client/src/pages/portfolio/[userId]/[name].jsx @@ -81,8 +81,6 @@ export async function getStaticProps({ params: { userId } }) { .filter(({ model }) => model === 'Article') .reduce((prev, curr) => [...prev, curr.reference], []); - const noOfArticle = articleIdList.length; - const { data: { getListOfArticles: articleList }, } = await GraphClient.query({ @@ -93,6 +91,8 @@ export async function getStaticProps({ params: { userId } }) { }, }); + const noOfArticle = articleList.length; + let { store, storePath } = picture; let profileImageLink = getStores[store] + storePath;