Skip to content

Commit c74df3f

Browse files
committed
improved search feedback
1 parent 045adf7 commit c74df3f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/components/Category/Category.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Star, GitPullRequest, Eye } from 'react-feather';
33
import ReactTooltip from 'react-tooltip';
44
import { Link, withRouter } from 'react-router-dom';
55

6-
const Category = ({ history, filteredResources }) => {
6+
const Category = ({ history, filteredResources, searchInput }) => {
77
return (
88
<>
99
<ReactTooltip type='light' />
@@ -15,8 +15,8 @@ const Category = ({ history, filteredResources }) => {
1515
className='subtitle is-h5'
1616
style={{ margin: '2rem auto 0', padding: '0 10px' }}
1717
>
18-
No! Resource is Present with searched Keyword, Please search for
19-
something else...
18+
There is no resources present for searched Keyword "{searchInput}".
19+
Please try searching for something else.
2020
</p>
2121
) : (filteredResources &&
2222
filteredResources.length === 0 &&
@@ -27,7 +27,7 @@ const Category = ({ history, filteredResources }) => {
2727
style={{ margin: '2rem auto 0', padding: '0 10px' }}
2828
>
2929
Either You have not Bookmarked any Resources or their is no
30-
resources present for searched Keyword.
30+
resources present for searched Keyword "{searchInput}"
3131
</p>
3232
) : (
3333
filteredResources.map((resource) => (

src/components/Category/Resources.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ const Resources = ({ searchInput, handleInputChange }) => {
104104
))}
105105
</div>
106106
</div>
107-
<Category filteredResources={filteredResources} />
107+
<Category
108+
searchInput={searchInput}
109+
filteredResources={filteredResources}
110+
/>
108111
</div>
109112
);
110113
};

0 commit comments

Comments
 (0)