From 3acac648ad6f7c220a48ff9f92f42e814c2097ab Mon Sep 17 00:00:00 2001
From: real-zephex <zephex-1@outlook.com>
Date: Tue, 26 Mar 2024 13:21:55 +0530
Subject: restructured files

---
 src/app/search/page.jsx | 67 -------------------------------------------------
 1 file changed, 67 deletions(-)
 delete mode 100644 src/app/search/page.jsx

(limited to 'src/app/search/page.jsx')

diff --git a/src/app/search/page.jsx b/src/app/search/page.jsx
deleted file mode 100644
index 75f09bd..0000000
--- a/src/app/search/page.jsx
+++ /dev/null
@@ -1,67 +0,0 @@
-"use client";
-
-import "./search.css";
-import { FaSearch } from "react-icons/fa"; // Import the search icon from react-icons library
-import { useState } from "react";
-import Results from "./components/fetchInfo";
-import fetchedInfo from "./components/fetchedInfo";
-
-export default function Input() {
-	const [searchedAnime, setSearchedAnime] = useState(null);
-	const [loading, setLoading] = useState(null);
-	const [info, setInfo] = useState(null);
-
-	const handleKeyPress = async (event) => {
-		if (
-			(event.code === "Enter" ||
-				event.key === "Enter" ||
-				event.code === 13) &&
-			searchedAnime !== ""
-		) {
-			setLoading(true);
-			setInfo(await fetchedInfo(await Results(searchedAnime)));
-			setLoading(false);
-		} else if (
-			(event.code === "Enter" ||
-				event.key === "Enter" ||
-				event.code === 13) &&
-			searchedAnime === ""
-		) {
-			alert("Input cannot be empty");
-		}
-	};
-
-	return (
-		<div>
-			<div className="inputContainer">
-				<div className="searchContainer">
-					<FaSearch className="searchIcon" />
-					<input
-						onChange={(event) => {
-							if (event.target.value.trim() !== "") {
-								setSearchedAnime(event.target.value);
-							}
-						}}
-						onKeyDown={(event) => handleKeyPress(event)}
-						placeholder="Enter anime title"
-					></input>
-				</div>
-			</div>
-
-			{loading && (
-				<p
-					style={{
-						textAlign: "center",
-						fontFamily: "Kanit",
-						fontSize: 18,
-						color: "white",
-					}}
-				>
-					Please wait while we crunch all the data for you
-				</p>
-			)}
-
-			{info}
-		</div>
-	);
-}
-- 
cgit v1.2.3

