From 72d3fdf9142f8539d231753c33eaab4359c0213e Mon Sep 17 00:00:00 2001 From: Minju25Kim <48757517+minju25kim@users.noreply.github.com> Date: Fri, 10 Jun 2022 11:11:31 +0100 Subject: [PATCH] add object key inside return Relates #15 --- src/components/CategoryFilter.jsx | 290 ++---------------------------- src/components/search.jsx | 1 - 2 files changed, 19 insertions(+), 272 deletions(-) diff --git a/src/components/CategoryFilter.jsx b/src/components/CategoryFilter.jsx index 2d00aef..a669eb4 100644 --- a/src/components/CategoryFilter.jsx +++ b/src/components/CategoryFilter.jsx @@ -1,5 +1,4 @@ import React from "react"; -//import parse from "html-react-parser"; const categories = { Action: 28, @@ -23,37 +22,15 @@ const categories = { Western: 37, }; -// try to use this list -> html parse for loop -// but has some problem with checked value, -// so created html and copy and paste it. - -// const categoryList = Object.keys(categories); -// let list = ""; -// for (let category of categoryList) { -// list += /*html*/ ` -// -//
-// `; -// } - function CategoryFilter({ category, setCategory }) { return (
Movie Category
-
); } diff --git a/src/components/search.jsx b/src/components/search.jsx index ce2a0a0..e10d4dc 100644 --- a/src/components/search.jsx +++ b/src/components/search.jsx @@ -5,7 +5,6 @@ function Search({ search }) { const [movie, setMovie] = React.useState([]); const URL = "https://api.themoviedb.org/3/search/movie"; - console.log(URL); const api_key = import.meta.env.VITE_TMDB_API_KEY; const searchURL = `${URL}?api_key=${api_key}&query=${search}`;