added ability to hide filters

This commit is contained in:
philip-ellis-sp
2023-05-26 14:51:53 -05:00
parent 9872f6bb52
commit 9c1ebbd63b
6 changed files with 68 additions and 21 deletions

View File

@@ -12,10 +12,15 @@ export default function BlogCards({
const data = await getBlogPosts(filterCallback.join(','));
console.log(data.topics)
const resultset = []
for (const topic of data.topics) {
if (data.topics) {
for (const topic of data.topics) {
resultset.push(await getPostList(topic))
}
setCardData(resultset);
} else {
setCardData(undefined);
}
setCardData(resultset);
};
React.useEffect(() => {
@@ -45,7 +50,7 @@ export default function BlogCards({
</div>
);
} else {
return <div></div>;
return <div className={styles.noFound}> No Blog Post Found with the Given Search Criteria</div>;
}
}

View File

@@ -17,3 +17,11 @@
.space {
height: 200px;
}
.noFound {
font-size: 28px;
font-weight: 500;
color: var(--dev-secondary-text);
padding: 8px;
margin: 50px;
}