Skip to content

Commit 8c2cb6b

Browse files
committed
Seach OK
1 parent 7f701ea commit 8c2cb6b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/components/posts/SearchContainer.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ import BaseContainer from "./BaseContainer";
44
import NoPostMessage from "./NoPostMessage";
55

66
const SearchContainer = () => {
7-
const { postState } = useContext(PostContext);
8-
if (postState.search.length === 0) {
7+
const {
8+
postState: { search, tags },
9+
} = useContext(PostContext);
10+
11+
if (search.length === 0) {
912
return <NoPostMessage msg="Posts Not Found" />;
1013
}
1114

12-
return <BaseContainer posts={postState.search} />;
15+
return <BaseContainer posts={search} tags={tags} />;
1316
};
1417

1518
export default SearchContainer;

0 commit comments

Comments
 (0)