+
+ setSearchTerm(e.target.value)}
+ />
+
+ {items.isLoading ? (
+
+
+
+ ) : (
+
+ {movies.length > 0 && (
+
+ {movies.map((item, index) => (
+
+ ))}
+
+ )}
+ {series.length > 0 && (
+
+ {series.map((item, index) => (
+
+ ))}
+
+ )}
+ {audios.length > 0 && (
+
+ {audios.map((item, index) => (
+
+ ))}
+
+ )}
+ {musicAlbum.length > 0 && (
+
+ {musicAlbum.map((item, index) => (
+
+ ))}
+
+ )}
+ {books.length > 0 && (
+
+ {books.map((item, index) => (
+
+ ))}
+
+ )}
+ {musicArtists.length > 0 && (
+
+ {musicArtists.map((item, index) => (
+
+ ))}
+
+ )}
+ {persons.length > 0 && (
+
+ {persons.map((item, index) => (
+
+ ))}
+
+ )}
+
+ )}
+
+ );
+};
+
+export default SearchPage;
diff --git a/src/routes/search/search.module.scss b/src/routes/search/search.module.scss
new file mode 100644
index 0000000..17b056d
--- /dev/null
+++ b/src/routes/search/search.module.scss
@@ -0,0 +1,24 @@
+/** @format */
+
+.search {
+ &-header {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 1em;
+ height: 4em;
+ }
+ &-searchbar {
+ border-radius: 100px !important;
+ background: rgb(255 255 255 / 0.09);
+ border: none !important;
+ .MuiInputBase-root.MuiOutlinedInput-root.MuiInputBase-colorPrimary.MuiInputBase-formControl.MuiInputBase-hiddenLabel.css-187yyed-MuiInputBase-root-MuiOutlinedInput-root {
+ border-radius: 100px !important;
+ }
+ &-input {
+ text-align: center;
+ padding: 0.75em 1.5em !important;
+ }
+ }
+}
diff --git a/src/utils/hooks/useDebounce.js b/src/utils/hooks/useDebounce.js
new file mode 100644
index 0000000..069c810
--- /dev/null
+++ b/src/utils/hooks/useDebounce.js
@@ -0,0 +1,29 @@
+/** @format */
+
+import { useEffect, useState } from "react";
+
+// see https://github.com/tannerlinsley/react-query/issues/293
+// see https://usehooks.com/useDebounce/
+export default function useDebounce(value, delay) {
+ // State and setters for debounced value
+ const [debouncedValue, setDebouncedValue] = useState(value);
+
+ useEffect(
+ () => {
+ // Update debounced value after delay
+ const handler = setTimeout(() => {
+ setDebouncedValue(value);
+ }, delay);
+
+ // Cancel the timeout if value changes (also on delay change or unmount)
+ // This is how we prevent debounced value from updating if value is changed ...
+ // .. within the delay period. Timeout gets cleared and restarted.
+ return () => {
+ clearTimeout(handler);
+ };
+ },
+ [value, delay], // Only re-call effect if value or delay changes
+ );
+
+ return debouncedValue;
+}