diff options
| author | real-zephex <[email protected]> | 2024-06-08 09:49:00 +0530 |
|---|---|---|
| committer | real-zephex <[email protected]> | 2024-06-08 09:49:00 +0530 |
| commit | e20a36cbe6a5d65a4c78250b0b4ca464d52cd91a (patch) | |
| tree | db50ba4a263d5c82d0272b8162e4ec9384c43a52 | |
| parent | feat �: anime video links are now automatically copied to the clipboard (diff) | |
| download | dramalama-e20a36cbe6a5d65a4c78250b0b4ca464d52cd91a.tar.xz dramalama-e20a36cbe6a5d65a4c78250b0b4ca464d52cd91a.zip | |
fix �: minor fix
| -rw-r--r-- | src/app/manga/components/chapterPages.jsx | 1 | ||||
| -rw-r--r-- | src/app/manga/components/inputContainer.jsx | 19 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/app/manga/components/chapterPages.jsx b/src/app/manga/components/chapterPages.jsx index 59320fd..c403357 100644 --- a/src/app/manga/components/chapterPages.jsx +++ b/src/app/manga/components/chapterPages.jsx @@ -10,7 +10,6 @@ const MangaChapters = async (id) => { for (let items of data.chapter.data) { chapterPages.push(`${data.baseUrl}/data/${data.chapter.hash}/${items}`); } - console.log(chapterPages); return ( <div className="flex flex-col items-center"> diff --git a/src/app/manga/components/inputContainer.jsx b/src/app/manga/components/inputContainer.jsx index 7526f9a..10b0a73 100644 --- a/src/app/manga/components/inputContainer.jsx +++ b/src/app/manga/components/inputContainer.jsx @@ -20,27 +20,27 @@ const MangaSearchBox = () => { <p className="text-center"> Start typing and results will show here </p> - </div>, + </div> ); - const [loading, setLoading] = useState(<></>); async function GetResults() { if (!searchedMangaTitle) { setResults(<></>); return; } - setLoading( + setResults( <Progress size="sm" isIndeterminate aria-label="Loading..." className="mb-4 mt-4 w-full" - />, + /> ); + const data = await SearchedMangaResults(searchedMangaTitle); const format = ( <div className="mt-2 w-full"> - {data && data.results.length > 0 ? ( + {data && data.results && data.results.length > 0 ? ( data.results.map((item, index) => ( <Link href={`/manga/${item.id}`} key={index}> <Card @@ -56,6 +56,7 @@ const MangaSearchBox = () => { isBlurred shadow="sm" className="p-1" + fetchPriority="high" /> <CardBody> <p className="text-xl"> @@ -87,7 +88,6 @@ const MangaSearchBox = () => { )} </div> ); - setLoading(<></>); setResults(format); } return ( @@ -102,11 +102,12 @@ const MangaSearchBox = () => { onChange={(event) => { setMangaSearchedTitle(event.target.value); }} - onKeyDown={async () => { - await GetResults(); + onKeyDown={async (event) => { + if (event.key !== "Control") { + await GetResults(); + } }} /> - {loading} {results} </div> </main> |