import React, { useState } from "react"; import useFetch from "../hooks/useFetch"; import { Pagination } from "@mui/material"; import { ClipLoader } from "react-spinners"; import Card from "../components/Card"; const HomePage = () => { const url = import.meta.env.VITE_BASE_URL; const [inputValue, setInputValue] = useState(""); const [searchValue, setSearchValue] = useState(""); const [page, setPage] = useState(1); const { data, loading, error } = useFetch( url + "&s=" + searchValue + "&page=" + page ); console.log(page); const handlePageChange = (e) => { setPage(e?.target?.textContent); }; const handleSearch = (event) => { event.preventDefault(); setSearchValue(inputValue); }; return (