diff --git a/src/App.js b/src/App.js index 128e44d..2de7660 100644 --- a/src/App.js +++ b/src/App.js @@ -8,15 +8,16 @@ function App() { const [data, setData] = useState([]); const [isAdding, setIsAdding] = useState(false); const [searchQuery, setSearchQuery] = useState(''); + const [numberOfResults, setNumberOfResults] = useState(0); function exitAdding() { - setIsAdding(!isAdding) + setIsAdding(!isAdding); } function search(e) { setSearchQuery(e.target.value); } - + // setNumberOfResults(filteredData.length); const filteredData = data.filter((e) => { return (e.name.toLowerCase().includes(searchQuery.toLowerCase()) || e.title.toLowerCase().includes(searchQuery.toLowerCase()) || e.tag.toLowerCase().includes(searchQuery.toLowerCase())) }); @@ -32,6 +33,10 @@ function App() { useEffect(() => { fetchData(); }, []); + + useEffect(() => { + setNumberOfResults(filteredData.length); + }, [filteredData]); return (
@@ -39,7 +44,7 @@ function App() {
-

hi

+

{numberOfResults > 0 ? numberOfResults + ' Bookmarks found' : 'Nothing found.'}

{isAdding ? : null} diff --git a/src/componets/List.js b/src/componets/List.js index 2bafc6d..8a67c9f 100644 --- a/src/componets/List.js +++ b/src/componets/List.js @@ -28,10 +28,10 @@ const List = ({data, reFetch}) => { try { const url = new URL(e.link); const favicon = 'http://www.google.com/s2/favicons?domain=' + url.hostname; - return
+ return
-
+
{i + 1}. {e.name}
{e.title}
diff --git a/src/styles/App.css b/src/styles/App.css index f0edc49..89869f6 100644 --- a/src/styles/App.css +++ b/src/styles/App.css @@ -53,3 +53,8 @@ textarea:focus, input:focus{ outline: none; } + +.results { + margin: 20px; + margin-left: 30px; +} \ No newline at end of file diff --git a/src/styles/List.css b/src/styles/List.css index 665441b..e04edf6 100644 --- a/src/styles/List.css +++ b/src/styles/List.css @@ -1,11 +1,14 @@ .list { width: 100%; text-align: left; - padding-top: 20px; border-spacing: 10px 10px; } .list img { + pointer-events: none; + -moz-user-select: none; + -webkit-user-select: none; + user-select: none; position: absolute; filter: blur(3px); margin: 20px; @@ -30,7 +33,7 @@ .list-entity-content { text-shadow: 1px 1px 2px black; - z-index: 1; + z-index: 0; margin-left: 50px; padding: 20px; justify-content: space-between;