-
Notifications
You must be signed in to change notification settings - Fork 16
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
[5주차] ForgetMeNot 미션 제출합니다 #4
Closed
Closed
Changes from all commits
Commits
Show all changes
75 commits
Select commit
Hold shift + click to select a range
6cec7e8
feat : next.js 세팅
JeeeunOh 240f742
feat : readMe 수정
JeeeunOh 6ab37a5
feat : nextJS로 app 세팅
JeeeunOh c921076
fix : 쓸데없는 코드 다 지우기
JeeeunOh 010591d
feat : 라우터 구성
JeeeunOh 903c49a
(chaeyeon) style: change global.css
chaeyeonan 1c4d617
(chaeyeon) style: change container/main css
chaeyeonan 9a6ea9a
feat : 네비게이터 png 추가
JeeeunOh 530be51
feat : styled-components 세팅
JeeeunOh 4ae25d3
Merge remote-tracking branch 'origin/chaeyeon' into 0909oje
JeeeunOh 8a26c58
fix : 네비게이터 작업중
JeeeunOh 2c8cb9b
feat: detail page 초안
chaeyeonan 90e4fc5
feat : 네비게이션 바 추가
JeeeunOh c31c476
fix : 라우터 링크 리스트 삭제
JeeeunOh 70becae
영화 카테고리 컴포넌트 생성
JeeeunOh d4d0251
feat : 메인영화 밑 버튼 세팅
JeeeunOh 4ba5335
feat: search page 초안
chaeyeonan aeec980
ongoing: png -> svg
chaeyeonan 2b1e0a9
ongoing: import svg
chaeyeonan 8ae3560
fix : svg 적용
JeeeunOh e0830e1
fix : 이미지 svg로 변경
JeeeunOh 88ae9e3
feat : 애니메이션 2초 보여주고 home 진입
JeeeunOh b6bc589
fix : 애니메이션 지속 시간 수정
JeeeunOh 6e69797
svg 이미지 경로 변경
chaeyeonan 355fa26
fix: icon 확장자 svg로 변환
chaeyeonan 87fc34e
fix : 커밍쑨, 다운로드 작동 안하게 수정
JeeeunOh e41ddb2
feat : preview 이미지 서버에서 가져옴
JeeeunOh 55227de
feat : info 안에 영화 데이터 배열 담기
JeeeunOh 7cc63a5
feat : 카테고리별로 다른 사진 뜨게 설정
JeeeunOh 9196de5
feat : home -> detail 연결
JeeeunOh e7f9557
fix : 네비게이터에서 detail 페이지 삭제
JeeeunOh 14c2bd2
chore : 쓸데없는 주석 삭제
JeeeunOh 7644abd
Merge branch 'chaeyeon' into 0909oje
JeeeunOh bb9c0f7
fix : 로고 수정
JeeeunOh 158e4a1
feat: search page api 연결
chaeyeonan 6ed3655
fix : 영화 이미지 비율 수정
JeeeunOh ac163a8
fix : 이미지 파일들 asset/img/로 이동
JeeeunOh 6ad82f8
feat: 검색 기능 완료
chaeyeonan bdd7edb
fix : 글씨 css 수정
JeeeunOh a2b0fb3
Merge branch 'chaeyeon' into 0909oje
JeeeunOh 12f05dd
fix : 폴더구조 바꾼것 반영
JeeeunOh 471e5fc
feat: search 리스트에서 detail 연결
chaeyeonan 0055d72
fix: 필요없는 이미지 삭제
chaeyeonan 4f84a71
우당탕탕
JeeeunOh d722164
feat : pageProps
JeeeunOh 434f1db
for pull
chaeyeonan 75d5d02
Merge branch '0909oje' of https://github.com/ForgetMeNot-FE/next-netf…
chaeyeonan acc385f
feat: search page getServerSideProps
chaeyeonan 390ea6e
fix: change search api path
chaeyeonan 75d0321
feat : api 연결 완료
JeeeunOh 38b13d2
Merge branch 'chaeyeon' into 0909oje
JeeeunOh 4cdb9d5
feat : merge
JeeeunOh 3ce4ccc
fix : roundImg 이미지 깨짐 수정
JeeeunOh 1465197
feat : detail 페이지 SSR 적용
JeeeunOh fd61a58
fix : 쓸데없는 코드 삭제
JeeeunOh d5ddeeb
fix : 라운드 이미지 깨짐 수정
JeeeunOh b958cf6
fix : title 폰트사이즈 수정
JeeeunOh e1c4601
Update README.md
JeeeunOh 00317a1
Update README.md
JeeeunOh afe699f
feat: for pull
chaeyeonan 921b60c
fix: image 파일 경로 변경 & naviagtion 수정
chaeyeonan ebc0a5a
feat: 서치페이지 부분 스크롤 추가
chaeyeonan e821fed
fix: 전체적인 디자인 수정
chaeyeonan b96b93c
fix: 쓸데없는 코드 수정
chaeyeonan 9cfd602
Merge pull request #1 from ForgetMeNot-FE/chaeyeon
chaeyeonan 3100f69
fix: key 오류 수정
chaeyeonan 003f91a
fix: key 오류 수정
chaeyeonan b070641
Merge pull request #2 from ForgetMeNot-FE/chaeyeon
chaeyeonan 9d2e7f4
fix: 마지막 key 수정이길..
chaeyeonan 13ed30a
Merge pull request #3 from ForgetMeNot-FE/chaeyeon
chaeyeonan 635c68b
fix: 진짜진짜 마지막 key 오류 수정
chaeyeonan 4d99757
Merge pull request #4 from ForgetMeNot-FE/chaeyeon
chaeyeonan d1610a1
fix: 진짜 최종
chaeyeonan 74ade68
Merge pull request #5 from ForgetMeNot-FE/chaeyeon
chaeyeonan d5015f5
fix : api 관련 변수들 api-info에 모아놓기
JeeeunOh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"presets": ["next/babel"], | ||
"plugins": [["styled-components", { "ssr": true }]] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
|
||
## Getting Started | ||
|
||
First, run the development server: | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
|
||
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. | ||
|
||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. | ||
|
||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. | ||
|
||
## Learn More | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
|
||
## Deploy on Vercel | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const api = "https://api.themoviedb.org/3/movie"; | ||
export const apiKey = 'dfc5ce9cefd9cafb067049fffa0be4e3'; | ||
export const imgPath = "https://image.tmdb.org/t/p/w500"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React, { useState } from "react"; | ||
|
||
function useInput(initialText: string) { | ||
const [text, setText] = useState(initialText); | ||
|
||
const handleChange = (e: React.ChangeEvent<HTMLInputElement>): void => { | ||
setText(e.target.value); | ||
}; | ||
|
||
const resetText = (): void => { | ||
setText(""); | ||
}; | ||
|
||
return { text, handleChange, resetText }; | ||
} | ||
|
||
export default useInput; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import styled from "styled-components"; | ||
import Link from "next/link"; | ||
import Image from "next/image"; | ||
import { useRouter } from "next/router"; | ||
|
||
const naviList = [ | ||
{ id: 0, src: "navi1", text: "Home", link: "/home" }, | ||
{ id: 1, src: "navi2", text: "Search", link: "/search" }, | ||
{ id: 2, src: "navi3", text: "Coming Soon", link: "" }, | ||
{ id: 3, src: "navi4", text: "Downloads", link: "" }, | ||
{ id: 4, src: "navi5", text: "More", link: "" }, | ||
]; | ||
|
||
const Navigator = () => { | ||
const pathName = useRouter(); | ||
|
||
return ( | ||
<Container> | ||
<> | ||
{naviList.map((item, idx) => ( | ||
<NaviContainer> | ||
<Link href={item.link} key={idx}> | ||
{pathName.pathname === item.link ? ( | ||
<> | ||
<Image | ||
src={`/img/navigator/select_${item.src}.svg`} | ||
alt="navi" | ||
width={20} | ||
height={20} | ||
key={idx} | ||
/> | ||
<NaviText color="#fffff" key={idx}> | ||
{" "} | ||
{item.text}{" "} | ||
</NaviText> | ||
</> | ||
) : ( | ||
<> | ||
<Image | ||
src={`/img/navigator/${item.src}.svg`} | ||
alt="navi" | ||
width={20} | ||
height={20} | ||
key={idx} | ||
/> | ||
<NaviText key={idx}> {item.text} </NaviText> | ||
</> | ||
)} | ||
</Link> | ||
</NaviContainer> | ||
))} | ||
</> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default Navigator; | ||
|
||
const Container = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
width: 400px; | ||
height: 4rem; | ||
background-color: #121212; | ||
position: fixed; | ||
bottom: 0; | ||
`; | ||
const NaviContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
padding: 1rem; | ||
`; | ||
|
||
const NaviText = styled.div<{ color?: string }>` | ||
font-size: 0.7rem; | ||
margin-top: 0.2rem; | ||
color: ${(props) => props.color || "#878787"}; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import styled from "styled-components"; | ||
|
||
const Header = () => { | ||
return ( | ||
<HeaderWrap> | ||
<Logo src="/img/home/logo.png" /> | ||
<HeaderText href="#"> TV shows </HeaderText> | ||
<HeaderText href="#"> Movies </HeaderText> | ||
<HeaderText href="#"> My List </HeaderText> | ||
</HeaderWrap> | ||
); | ||
}; | ||
|
||
export default Header; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Header을 component로 따로 빼서 전체적으로 깔끔한 것 같습니다 |
||
const HeaderWrap = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
width: 380px; | ||
height: 5rem; | ||
z-index: 99; | ||
padding: 1rem 1rem 0 0; | ||
`; | ||
const Logo = styled.img` | ||
height: 3.5rem; | ||
width: 3.5rem; | ||
`; | ||
const HeaderText = styled.a` | ||
font-size: 1.1rem; | ||
font-weight: 400; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import Image from "next/image"; | ||
import styled from "styled-components"; | ||
|
||
const PlayBtn = ({ width }: { width: number }) => { | ||
return ( | ||
<Play width={width}> | ||
<PlayImg src="/img/icons/play.svg" alt="playbtn" width={18} height={21} /> | ||
<div>Play</div> | ||
</Play> | ||
); | ||
}; | ||
|
||
export default PlayBtn; | ||
|
||
const Play = styled.button<{ width?: number }>` | ||
width: ${(props) => props.width || 320}px; | ||
height: 45px; | ||
border: none; | ||
border-radius: 0.4rem; | ||
background: rgb(196, 196, 196); | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: 20px; | ||
font-weight: 600; | ||
`; | ||
const PlayImg = styled(Image)` | ||
margin-right: 0.7rem; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import styled from "styled-components"; | ||
import Image from "next/image"; | ||
import {imgPath} from "../../asset/api-info"; | ||
|
||
const SearchItem = ({ imgSrc, name }: { imgSrc: string; name: string }) => { | ||
return ( | ||
<ItemWrap> | ||
<img src={`${imgPath}/${imgSrc}`} style={{ width: "146px" }} /> | ||
<ItemTitle>{name}</ItemTitle> | ||
<Image src="/img/icons/play2.svg" alt="close" width={24} height={24} /> | ||
</ItemWrap> | ||
); | ||
}; | ||
|
||
export default SearchItem; | ||
|
||
const ItemWrap = styled.div` | ||
width: 400px; | ||
height: 76px; | ||
display: flex; | ||
align-items: center; | ||
overflow: hidden; | ||
background: rgb(66, 66, 66); | ||
margin: 2.5px 0; | ||
`; | ||
|
||
const ItemTitle = styled.div` | ||
width: 215px; | ||
padding-left: 20px; | ||
font-size: 15px; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
reactStrictMode: true, | ||
swcMinify: true, | ||
}; | ||
|
||
module.exports = nextConfig; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
확실히 ts를 쓰면 이렇게 깔끔하게 정보를 저장해두고 styled나 코드 적용할 때 갖다 쓸 수 있군요!