We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f701ea commit 8c2cb6bCopy full SHA for 8c2cb6b
src/components/posts/SearchContainer.js
@@ -4,12 +4,15 @@ import BaseContainer from "./BaseContainer";
4
import NoPostMessage from "./NoPostMessage";
5
6
const SearchContainer = () => {
7
- const { postState } = useContext(PostContext);
8
- if (postState.search.length === 0) {
+ const {
+ postState: { search, tags },
9
+ } = useContext(PostContext);
10
+
11
+ if (search.length === 0) {
12
return <NoPostMessage msg="Posts Not Found" />;
13
}
14
- return <BaseContainer posts={postState.search} />;
15
+ return <BaseContainer posts={search} tags={tags} />;
16
};
17
18
export default SearchContainer;
0 commit comments