Skip to content
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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Kdt5 lee chang hwi_6์กฐ #73

wants to merge 7 commits into from

Conversation

leechanghwi
Copy link

@leechanghwi leechanghwi commented May 10, 2023

๐ŸŽฌ ์˜ํ™” ๊ฒ€์ƒ‰

์ฃผ์–ด์ง„ API๋ฅผ ํ™œ์šฉํ•ด '์™„์„ฑ ์˜ˆ์‹œ' ์ฒ˜๋Ÿผ ์ž์œ ๋กญ๊ฒŒ ์˜ํ™” ๊ฒ€์ƒ‰ ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•ด๋ณด์„ธ์š”!
๊ณผ์ œ ์ˆ˜ํ–‰ ๋ฐ ๋ฆฌ๋ทฐ ๊ธฐ๊ฐ„์€ ๋ณ„๋„ ๊ณต์ง€๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”!

์™„์„ฑ์ฃผ์†Œ ๋งํฌ: https://hwi-moviesearch.netlify.app/

๊ณผ์ œ ์ˆ˜ํ–‰ ๋ฐ ์ œ์ถœ ๋ฐฉ๋ฒ•

KDT๊ธฐ์ˆ˜๋ฒˆํ˜ธ_์ด๋ฆ„  |  E.g, KDT0_ParkYoungWoong
  1. ํ˜„์žฌ ์ €์žฅ์†Œ๋ฅผ ๋กœ์ปฌ์— ํด๋ก (Clone)ํ•ฉ๋‹ˆ๋‹ค.
  2. ์ž์‹ ์˜ ๋ณธ๋ช…์œผ๋กœ ๋ธŒ๋žœ์น˜๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.(๊ตฌ๋ถ„ ๊ฐ€๋Šฅํ•˜๋„๋ก ๋ณธ๋ช…์„ ๊ผญ ํŒŒ์Šค์นผ์ผ€์ด์Šค๋กœ ํ‘œ์‹œํ•˜์„ธ์š”, git branch KDT0_ParkYoungWoong)
  3. ์ž์‹ ์˜ ๋ณธ๋ช… ๋ธŒ๋žœ์น˜์—์„œ ๊ณผ์ œ๋ฅผ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.
  4. ๊ณผ์ œ ์ˆ˜ํ–‰์ด ์™„๋ฃŒ๋˜๋ฉด, ์ž์‹ ์˜ ๋ณธ๋ช… ๋ธŒ๋žœ์น˜๋ฅผ ์›๊ฒฉ ์ €์žฅ์†Œ์— ํ‘ธ์‹œ(Push)ํ•ฉ๋‹ˆ๋‹ค.(main ๋ธŒ๋žœ์น˜์— ํ‘ธ์‹œํ•˜์ง€ ์•Š๋„๋ก ๊ผญ ์ฃผ์˜ํ•˜์„ธ์š”, git push origin KDT0_ParkYoungWoong)
  5. ์ €์žฅ์†Œ์—์„œ main ๋ธŒ๋žœ์น˜๋ฅผ ๋Œ€์ƒ์œผ๋กœ Pull Request ์ƒ์„ฑํ•˜๋ฉด, ๊ณผ์ œ ์ œ์ถœ์ด ์™„๋ฃŒ๋ฉ๋‹ˆ๋‹ค!(E.g, main <== KDT0_ParkYoungWoong)
  • main ํ˜น์€ ๋‹ค๋ฅธ ์‚ฌ๋žŒ์˜ ๋ธŒ๋žœ์น˜๋กœ ์ ˆ๋Œ€ ๋ณ‘ํ•ฉํ•˜์ง€ ์•Š๋„๋ก ์ฃผ์˜ํ•˜์„ธ์š”!
  • Pull Request์—์„œ ๋ณด์ด๋Š” ์„ค๋ช…์„ ๋‹ค๋ฅธ ์‚ฌ๋žŒ๋“ค์ด ์ดํ•ดํ•˜๊ธฐ ์‰ฝ๋„๋ก ๊ผผ๊ผผํ•˜๊ฒŒ ์ž‘์„ฑํ•˜์„ธ์š”!
  • Pull Request์—์„œ ๊ณผ์ œ ์ œ์ถœ ํ›„ ์ ˆ๋Œ€ ๋ณ‘ํ•ฉ(Merge)ํ•˜์ง€ ์•Š๋„๋ก ์ฃผ์˜ํ•˜์„ธ์š”!
  • ๊ณผ์ œ ์ˆ˜ํ–‰ ๋ฐ ์ œ์ถœ ๊ณผ์ •์—์„œ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•œ ๊ฒฝ์šฐ, ๋ฐ”๋กœ ๋‹ด๋‹น ๋ฉ˜ํ† ๋‚˜ ๊ฐ•์‚ฌ์—์„œ ์–˜๊ธฐํ•˜์„ธ์š”!

์š”๊ตฌ์‚ฌํ•ญ

ํ•„์ˆ˜ ์š”๊ตฌ์‚ฌํ•ญ์€ ๊ผญ ๋‹ฌ์„ฑํ•ด์•ผ ํ•˜๋Š” ๋ชฉํ‘œ๋กœ, ์ˆ˜์ •/์‚ญ์ œ๋Š” ๋ถˆ๊ฐ€ํ•˜๊ณ  ์ถ”๊ฐ€๋Š” ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.
์„ ํƒ ์š”๊ตฌ์‚ฌํ•ญ์€ ๋‹จ์ˆœ ์˜ˆ์‹œ๋กœ, ์ž์œ ๋กญ๊ฒŒ ์ถ”๊ฐ€/์ˆ˜์ •/์‚ญ์ œํ•ด์„œ ๊ตฌํ˜„ํ•ด๋ณด์„ธ์š”.
๊ฐ ์š”๊ตฌ์‚ฌํ•ญ์€ ๋‹ฌ์„ฑ ํ›„ ๋งˆํฌ๋‹ค์šด์—์„œ - [x]๋กœ ํ‘œ์‹œํ•˜์„ธ์š”.

โ— ํ•„์ˆ˜

  • ์˜ํ™” ์ œ๋ชฉ์œผ๋กœ ๊ฒ€์ƒ‰์ด ๊ฐ€๋Šฅํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค!
  • ๊ฒ€์ƒ‰๋œ ๊ฒฐ๊ณผ์˜ ์˜ํ™” ๋ชฉ๋ก์ด ์ถœ๋ ฅ๋ผ์•ผ ํ•ฉ๋‹ˆ๋‹ค!
  • ๋‹จ์ผ ์˜ํ™”์˜ ์ƒ์„ธ์ •๋ณด(์ œ๋ชฉ, ๊ฐœ๋ด‰์—ฐ๋„, ํ‰์ , ์žฅ๋ฅด, ๊ฐ๋…, ๋ฐฐ์šฐ, ์ค„๊ฑฐ๋ฆฌ, ํฌ์Šคํ„ฐ ๋“ฑ)๋ฅผ ๋ณผ ์ˆ˜ ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค!
  • ์‹ค์ œ ์„œ๋น„์Šค๋กœ ๋ฐฐํฌํ•˜๊ณ  ์ ‘๊ทผ ๊ฐ€๋Šฅํ•œ ๋งํฌ๋ฅผ ์ถ”๊ฐ€ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

โ” ์„ ํƒ

  • ํ•œ ๋ฒˆ์˜ ๊ฒ€์ƒ‰์œผ๋กœ ์˜ํ™” ๋ชฉ๋ก์ด 20๊ฐœ ์ด์ƒ ๊ฒ€์ƒ‰๋˜๋„๋ก ๋งŒ๋“ค์–ด๋ณด์„ธ์š”.
  • ์˜ํ™” ๊ฐœ๋ด‰์—ฐ๋„๋กœ ๊ฒ€์ƒ‰ํ•  ์ˆ˜ ์žˆ๋„๋ก ๋งŒ๋“ค์–ด๋ณด์„ธ์š”.
  • ์˜ํ™” ๋ชฉ๋ก์„ ๊ฒ€์ƒ‰ํ•˜๋Š” ๋™์•ˆ ๋กœ๋”ฉ ์• ๋‹ˆ๋ฉ”์ด์…˜์ด ๋ณด์ด๋„๋ก ๋งŒ๋“ค์–ด๋ณด์„ธ์š”.
  • ๋ฌดํ•œ ์Šคํฌ๋กค ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ•ด์„œ ์ถ”๊ฐ€ ์˜ํ™” ๋ชฉ๋ก์„ ๋ณผ ์ˆ˜ ์žˆ๋„๋ก ๋งŒ๋“ค์–ด๋ณด์„ธ์š”.
  • ์˜ํ™” ํฌ์Šคํ„ฐ๊ฐ€ ์—†์„ ๊ฒฝ์šฐ ๋Œ€์ฒด ์ด๋ฏธ์ง€๋ฅผ ์ถœ๋ ฅํ•˜๋„๋ก ๋งŒ๋“ค์–ด๋ณด์„ธ์š”.
  • ์˜ํ™” ์ƒ์„ธ์ •๋ณด๊ฐ€ ์ถœ๋ ฅ๋˜๊ธฐ ์ „์— ๋กœ๋”ฉ ์• ๋‹ˆ๋ฉ”์ด์…˜์ด ๋ณด์ด๋„๋ก ๋งŒ๋“ค์–ด๋ณด์„ธ์š”.
  • ์˜ํ™” ์ƒ์„ธ์ •๋ณด ํฌ์Šคํ„ฐ๋ฅผ ๊ณ ํ•ด์ƒ๋„๋กœ ์ถœ๋ ฅํ•ด๋ณด์„ธ์š”. (์‹ค์‹œ๊ฐ„ ์ด๋ฏธ์ง€ ๋ฆฌ์‚ฌ์ด์ง•)
  • ์ฐจ๋ณ„ํ™”๊ฐ€ ๊ฐ€๋Šฅํ•˜๋„๋ก ํ”„๋กœ์ ํŠธ๋ฅผ ์ตœ๋Œ€ํ•œ ์˜ˆ์˜๊ฒŒ ๋งŒ๋“ค์–ด๋ณด์„ธ์š”.
  • ์˜ํ™”์™€ ๊ด€๋ จ๋œ ๊ธฐํƒ€ ๊ธฐ๋Šฅ๋„ ๊ณ ๋ คํ•ด๋ณด์„ธ์š”.

Copy link
Member

@iamidlek iamidlek left a 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` }],
Copy link
Member

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">
Copy link
Member

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=""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

className ๋ถˆํ•„์š”ํ•ด ๋ณด์ž…๋‹ˆ๋‹ค.

Comment on lines +16 to +24
<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>
Copy link
Member

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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ฐ”๋กœ ๊ตฌ์กฐ ๋ถ„ํ•ดํ•˜์—ฌ ๋ฐ›์œผ์…”๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

Suggested change
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()}
Copy link
Member

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({
Copy link
Member

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++) {
Copy link
Member

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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ „์ฒด์ ์œผ๋กœ ๋‹ค์‹œ ๋กœ์ง์„ ์ƒ๊ฐํ•ด ๋ณด์‹œ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.
์˜ˆ๋ฅผ ๋“ค์–ด 30 ๊ฐœ์˜ ์š”์ฒญ์ด๋ผ๋ฉด ์š”์ฒญ ๊ฐœ์ˆ˜์— ๋งž๋Š” ํŽ˜์ด์ง€ ์ˆ˜๋ฅผ ๊ตฌํ•˜๊ณ 
๊ทธ์— ๋งž๊ฒŒ ์š”์ฒญ์„ ๋ณด๋‚ด ๋ฐ›์€ ๊ฐ’๋“ค์„ ํ•ฉ์ณ์„œ return ํ•ด์ฃผ๋Š” ๊ฒƒ์ด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.


return (
<>
<Header />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ฐ ํŽ˜์ด์ง€๋งˆ๋‹ค Header, Footer๋ฅผ ๋„ฃ์œผ์‹œ๋ฉด
๋ผ์šฐํŠธ ์ด๋™ ์‹œ ์žฌ๋žœ๋”๋ง์ด ๋œ๋‹ค๊ณ  ๋ณด์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.
layout ์œผ๋กœ ์‚ฌ์šฉํ•˜๊ณ  ๋ณ€ํ•˜๋Š” ๋ถ€๋ถ„๋งŒ ์žฌ๋žœ๋”๋ง ๋˜๋„๋ก ํ•ด์ฃผ์„ธ์š”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants