From 180c9577f8337991ca71470816333fe8430cd3ca Mon Sep 17 00:00:00 2001 From: real-zephex Date: Fri, 24 May 2024 22:51:36 +0530 Subject: =?UTF-8?q?=E2=9C=A8=20feat(ui):=20=F0=9F=8E=A8=20migrate=20from?= =?UTF-8?q?=20vanilla=20css=20to=20tailwind=20css,=20adopted=20next=20ui?= =?UTF-8?q?=20and=20restructured?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/kdrama/components/search.jsx | 65 ------------------------------------ 1 file changed, 65 deletions(-) delete mode 100644 src/app/kdrama/components/search.jsx (limited to 'src/app/kdrama/components/search.jsx') diff --git a/src/app/kdrama/components/search.jsx b/src/app/kdrama/components/search.jsx deleted file mode 100644 index f44e4bb..0000000 --- a/src/app/kdrama/components/search.jsx +++ /dev/null @@ -1,65 +0,0 @@ -"use client"; - -import styles from "../styles/search.module.css"; -import { useState } from "react"; -import { FaSearch } from "react-icons/fa"; -import FetchSearchTitle from "./searchQuery"; -import Image from "next/image"; -import Link from "next/link"; -import { PreFetchAnimeInfo } from "./cacher"; - -export default function DramaSearch() { - const [title, setTitle] = useState(""); - const [infoTitle, setInfoTitle] = useState(null); - const [loadingText, setLoadingText] = useState(null); - - const handleSearch = async (title) => { - setLoadingText(true); - const data = await FetchSearchTitle(title); - PreFetchAnimeInfo(data); - setLoadingText(false); - setInfoTitle(data); - }; - - return ( -
-
- - setTitle(event.target.value)} - onKeyDown={async (e) => { - if ((e.key === "Enter" || e.code === 13) && title) { - await handleSearch(e.target.value); - } - }} - > -
- - {loadingText && ( -

Wait a moment...

- )} - -
- {infoTitle && - infoTitle.results.map((item, index) => ( - -
-

{item.title}

- Drama Poster -
- - ))} -
-
- ); -} -- cgit v1.2.3