-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kdt5 lee chang hwi_6์กฐ #73
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ณ ์ํ์
จ์ต๋๋ค.
์ ๋ฐ์ ์ผ๋ก ์ ํด์ฃผ์
จ์ต๋๋ค.
์ปค๋ฐ, ํด๋ ๊ตฌ์กฐ, ๊ตฌํ ๊ธฐ๋ฅ์ ๋ํ ๋ก์ง ํ์ธ๊ณผ ๊ฐ์ ๋ถ๋ถ์ด
์กฐ๊ธ ๋ ํ์ํ ๊ฒ ๊ฐ์ต๋๋ค.
root์ src, public, readme ๋ฑ ๋์ด์ฃผ์๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค.
favicon ์ฌ์ฉ์ ๋ธ๋ผ์ฐ์ ํญ์ icon์ฉ์ผ๋ก ํ์๋ฉด ์ข์ ๊ฒ ๊ฐ๊ณ
tailwind class๊ฐ ์ค๋ณต๋์ด ๋ฎ์ด์์ด์ง๋ ๋ถ๋ถ์ด ์ข
์ข
๋ณด์ฌ์ ์ฃผ์ํ์ฌ ์ฌ์ฉํ๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค.
export default defineConfig({ | ||
plugins: [react()], | ||
resolve: { | ||
alias: [{ find: "~", replacement: `${__dirname}/src` }], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alias ์ค์ ํ ์ฌ์ฉ์ ์ํ์ ๊ฒ ๊ฐ์ต๋๋ค.
<span className="text-regal-yellow opacity-30 ">OMDbAPI</span>.COM | ||
</a> | ||
</li> | ||
<li className="text-regal-yellow opacity-30 decoration: underline"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
decoration: ์คํ์ธ ๊ฒ ๊ฐ์ต๋๋ค.
</li> | ||
<li className="text-regal-yellow opacity-30 decoration: underline"> | ||
<a | ||
className="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
className ๋ถํ์ํด ๋ณด์ ๋๋ค.
<li | ||
className={`w-20 m-0 h-10 flex items-center justify-center ${ | ||
location.pathname === "/" | ||
? "bg-regal-yellow text-white" | ||
: "active:bg-regal-yellow hover:text-yellow-300 " | ||
} rounded-lg py-2 px-4`} | ||
> | ||
<a href="/">Search</a> | ||
</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋์ผํ li ๊ฐ ๋ฐ๋ณต๋๋ ๊ฒ ๊ฐ์ต๋๋ค.
์ปดํฌ๋ํธํ ํด๋ณด๋ ๊ฒ๋ ์ข์ ์ฐ์ต์ด ๋ ๊ฒ ๊ฐ์ต๋๋ค.
@@ -0,0 +1,63 @@ | |||
import React from "react"; | |||
|
|||
export default function MovieFilter(props) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ฐ๋ก ๊ตฌ์กฐ ๋ถํดํ์ฌ ๋ฐ์ผ์ ๋ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค.
export default function MovieFilter(props) { | |
export default function MovieFilter({ | |
typeFilter, | |
setTypeFilter, | |
countFilter, | |
setCountFilter, | |
yearFilter, | |
setYearFilter, | |
}) { |
placeholder="Search for Movies, series & more" | ||
value={inputText} | ||
onChange={(e) => setInputText(e.target.value)} | ||
onKeyDown={(e) => e.key === "Enter" && pressEnterKey()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด๋ฒคํธ ํธ๋ค๋ง์ ๋ํ ํจ์๋ช
์ปจ๋ฒค์
์ด ์์ด์ผ ํ ๊ฒ ๊ฐ์ต๋๋ค.
e.key === "Enter" ๋ฅผ ํ์ธํ๋ ๋์์ด pressEnterKey() ํจ์ ๋ด์์ ํ์ธ๋ ๊ฒ ๊ฐ์ ์ธ์์ ์ค๋๋ค.
if (countFilter) { | ||
let result = []; | ||
for (let i = 1; i <= countFilter / 10; i++) { | ||
const { data } = await axios({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetchMovies ํจ์๋ฅผ ํธ์ถํ๋ฉด ์ด ๋ถ๋ถ์์ ํ๋ฒ๋ ์์ฒญ์ ๋ณด๋ด์ง ์์๊น์?
|
||
if (countFilter) { | ||
let result = []; | ||
for (let i = 1; i <= countFilter / 10; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for ์์ฒญ ์์์ await fetch ํ๋ ๊ฒ์ ์ข์ง ์์ ๊ฒ ๊ฐ์ต๋๋ค.
ํ์ํ ์์ฒญ์ ๋ชจ์ Promise.all๋ก ์์ฒญํ๋ ๊ฒ์ด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค.
}); | ||
result = result.concat(data.Search || []); | ||
} | ||
return result.slice(0, countFilter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ์ฒด์ ์ผ๋ก ๋ค์ ๋ก์ง์ ์๊ฐํด ๋ณด์๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค.
์๋ฅผ ๋ค์ด 30 ๊ฐ์ ์์ฒญ์ด๋ผ๋ฉด ์์ฒญ ๊ฐ์์ ๋ง๋ ํ์ด์ง ์๋ฅผ ๊ตฌํ๊ณ
๊ทธ์ ๋ง๊ฒ ์์ฒญ์ ๋ณด๋ด ๋ฐ์ ๊ฐ๋ค์ ํฉ์ณ์ return ํด์ฃผ๋ ๊ฒ์ด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค.
|
||
return ( | ||
<> | ||
<Header /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ฐ ํ์ด์ง๋ง๋ค Header, Footer๋ฅผ ๋ฃ์ผ์๋ฉด
๋ผ์ฐํธ ์ด๋ ์ ์ฌ๋๋๋ง์ด ๋๋ค๊ณ ๋ณด์๋ฉด ๋ฉ๋๋ค.
layout ์ผ๋ก ์ฌ์ฉํ๊ณ ๋ณํ๋ ๋ถ๋ถ๋ง ์ฌ๋๋๋ง ๋๋๋ก ํด์ฃผ์ธ์
๐ฌ ์ํ ๊ฒ์
์ฃผ์ด์ง API๋ฅผ ํ์ฉํด '์์ฑ ์์' ์ฒ๋ผ ์์ ๋กญ๊ฒ ์ํ ๊ฒ์ ๊ธฐ๋ฅ์ ๊ตฌํํด๋ณด์ธ์!
๊ณผ์ ์ํ ๋ฐ ๋ฆฌ๋ทฐ ๊ธฐ๊ฐ์ ๋ณ๋ ๊ณต์ง๋ฅผ ์ฐธ๊ณ ํ์ธ์!
์์ฑ์ฃผ์ ๋งํฌ: https://hwi-moviesearch.netlify.app/
๊ณผ์ ์ํ ๋ฐ ์ ์ถ ๋ฐฉ๋ฒ
git branch KDT0_ParkYoungWoong
)main
๋ธ๋์น์ ํธ์ํ์ง ์๋๋ก ๊ผญ ์ฃผ์ํ์ธ์,git push origin KDT0_ParkYoungWoong
)main
๋ธ๋์น๋ฅผ ๋์์ผ๋ก Pull Request ์์ฑํ๋ฉด, ๊ณผ์ ์ ์ถ์ด ์๋ฃ๋ฉ๋๋ค!(E.g,main
<==KDT0_ParkYoungWoong
)main
ํน์ ๋ค๋ฅธ ์ฌ๋์ ๋ธ๋์น๋ก ์ ๋ ๋ณํฉํ์ง ์๋๋ก ์ฃผ์ํ์ธ์!์๊ตฌ์ฌํญ
ํ์ ์๊ตฌ์ฌํญ์ ๊ผญ ๋ฌ์ฑํด์ผ ํ๋ ๋ชฉํ๋ก, ์์ /์ญ์ ๋ ๋ถ๊ฐํ๊ณ ์ถ๊ฐ๋ ๊ฐ๋ฅํฉ๋๋ค.
์ ํ ์๊ตฌ์ฌํญ์ ๋จ์ ์์๋ก, ์์ ๋กญ๊ฒ ์ถ๊ฐ/์์ /์ญ์ ํด์ ๊ตฌํํด๋ณด์ธ์.
๊ฐ ์๊ตฌ์ฌํญ์ ๋ฌ์ฑ ํ ๋งํฌ๋ค์ด์์
- [x]
๋ก ํ์ํ์ธ์.โ ํ์
โ ์ ํ