From 1eee8b5196828128a189d6e9bf889500aadb2308 Mon Sep 17 00:00:00 2001 From: real-zephex <143923795+real-zephex@users.noreply.github.com> Date: Sun, 7 Apr 2024 13:50:17 +0000 Subject: idek --- src/app/kdrama/[id]/page.jsx | 4 ++-- src/app/kdrama/components/popular.jsx | 2 +- src/app/kdrama/components/recent.jsx | 2 +- src/app/kdrama/components/search.jsx | 15 +++++++++++---- src/app/kdrama/page.jsx | 2 -- src/app/kdrama/styles/search.module.css | 6 ++++++ 6 files changed, 21 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/app/kdrama/[id]/page.jsx b/src/app/kdrama/[id]/page.jsx index 6a165d2..8f0fa9c 100644 --- a/src/app/kdrama/[id]/page.jsx +++ b/src/app/kdrama/[id]/page.jsx @@ -3,7 +3,7 @@ import Image from "next/image"; import EpisodesButtons from "./buttons"; import PreFetchVideoLinks from "../components/cacher"; -export const runtime = 'edge'; +export const runtime = "edge"; export default async function DramaInfo({ params }) { const id = decodeURIComponent(params.id); @@ -18,7 +18,7 @@ export default async function DramaInfo({ params }) {

{info.title}

Drama Poster
Drama Poster
Drama Poster { + setLoadingText(true); const data = await FetchSearchTitle(title); + setLoadingText(false); setInfoTitle(data); - } + }; return (
@@ -25,12 +28,16 @@ export default function DramaSearch() { onChange={(event) => setTitle(event.target.value)} onKeyDown={async (e) => { if ((e.key === "Enter" || e.code === 13) && title) { - await getSearchResults(e.target.value); + await handleSearch(e.target.value); } }} >
+ {loadingText && ( +

Wait a moment...

+ )} +
{infoTitle && infoTitle.results.map((item, index) => ( @@ -42,7 +49,7 @@ export default function DramaSearch() {

{item.title}