diff --git a/public/215697_small.mp4 b/public/215697_small.mp4 deleted file mode 100644 index b8139d5..0000000 Binary files a/public/215697_small.mp4 and /dev/null differ diff --git a/src/pages/Home.jsx b/src/pages/Home.jsx index 4ef0320..b49e3eb 100644 --- a/src/pages/Home.jsx +++ b/src/pages/Home.jsx @@ -23,7 +23,6 @@ const Home = () => { if (!hasMore) return; setShowSkeleton(true); - setLoading(true); setTimeout(() => { axios @@ -39,7 +38,7 @@ const Home = () => { setLoading(false); setShowSkeleton(false); }); - }, 2000); + }, 1000); }, [page]); useEffect(() => { @@ -58,11 +57,13 @@ const Home = () => { return; } + // FILTER DATA ACCORDING TO CHARACTER NAME const filtered = data.filter((character) => character.name.toLowerCase().includes(query) ); setFilteredData(filtered); + // AUTO COMPLETE SUGGESTIONS const autoSuggestions = data .map((character) => character.name) .filter((name) => name.toLowerCase().includes(query)) @@ -70,6 +71,7 @@ const Home = () => { setSuggestions(autoSuggestions); }; + // AUTO COMPLETE SUGGESTIONS ONCLICK const handleSuggestionClick = (suggestion) => { setSearchQuery(suggestion); setFilteredData( @@ -124,7 +126,7 @@ const Home = () => { {showSkeleton && (