-
Notifications
You must be signed in to change notification settings - Fork 11
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
[6주차] Hooking 미션 제출합니다. #13
Open
moong23
wants to merge
109
commits into
CEOS-Developers:master
Choose a base branch
from
Hooking-CEOS:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
109 commits
Select commit
Hold shift + click to select a range
174e4b2
initial commit
moong23 3d6cf7a
initializing project
moong23 bb1d51a
initializing project: directory 구조 세팅 및 styledcomponent 세팅
moong23 0ac915e
feat: svg file 사용 위한 모듈과 setting 변경
moong23 17db110
feat: navbar 완료
moong23 9da0af9
refactor: removing non-using props
moong23 4b60080
Merge pull request #1 from Hooking-CEOS/feature/navbar
moong23 5f18ea1
initialize: initializing genreList structure and branch
moong23 6e21bbf
feat: scrollbar view disabled
moong23 bb9448e
feat: genreList hard coding on index.js
moong23 d9962ba
feat: genreList itself content
moong23 c45291e
chore: item added for test
moong23 bbad972
Merge pull request #2 from Hooking-CEOS/feature/genre_list
moong23 f6766ce
initialize: initializing landing_page structure and branch
moong23 60219de
feat: landing page 끗
moong23 1fcba9a
Merge pull request #3 from Hooking-CEOS/feature/landing_page
moong23 0fa8c76
feat: 헤더 추가
2919a71
feat: mainContent 컴포넌트 추가
bac6805
style: global-style, theme 추가
b4de2d4
Merge pull request #4 from Hooking-CEOS/feature/header
hyosin-Jang 1975baf
feat: controlPanel 컴포넌트 추가
695c3f0
feat: index.js에 상단 컴포넌트들 추가
cac7e00
fix: z-index 쌓임 스택 어긋나는 에러 수정
b76fd37
Merge pull request #5 from Hooking-CEOS/feature/controlPanel
hyosin-Jang a9d1e02
chore: 색상 theme으로 분리
a2a306b
chore: 색상 수정
cc406ed
feat: api_connection wwith img datas
moong23 f70915a
Merge pull request #6 from Hooking-CEOS/feature/api_connection
moong23 b016110
Merge pull request #7 from Hooking-CEOS/dev
moong23 1ecbabf
fix: api https issue fixed
moong23 a05a152
Merge pull request #8 from Hooking-CEOS/fix/api_issue
moong23 cd086bb
Merge pull request #9 from Hooking-CEOS/dev
moong23 7ff8609
fix: api index page modified
moong23 97834b8
Merge pull request #10 from Hooking-CEOS/fix/api_issue
moong23 1c36ec0
refactor: img 태그 Next/Image 태그로 변경 및 css 수정
moong23 ee65dc1
Merge pull request #11 from Hooking-CEOS/refactor/image
moong23 fb9defb
refactor: panel width 수정 및 panel 자식에 flex-basis 설정
moong23 7ae08ac
WIP: scroll function adding in progress
moong23 095890d
Merge pull request #12 from Hooking-CEOS/refactor/panel
moong23 82ccab4
Merge pull request #13 from Hooking-CEOS/dev
moong23 f743fa2
feat: scroll시 위 헤더 invisible
moong23 4ba3670
Merge pull request #14 from Hooking-CEOS/feature/header_vanish
moong23 2447432
chore: play버튼 가운데정렬 / navbar 호버 해제 css
moong23 d2b4229
Merge pull request #15 from Hooking-CEOS/chore/minor_bug_fix
moong23 299ce68
Merge pull request #16 from Hooking-CEOS/dev
moong23 01f5078
refactor: index.js 반복되는 코드 정리및 minor bug fix
moong23 fb29777
Merge pull request #17 from Hooking-CEOS/chore/minor_bug_fix
moong23 b04c523
Merge pull request #18 from Hooking-CEOS/dev
moong23 34321ed
refactor: html부분 정리
moong23 8b7e85a
refactor: css정리및 중복코드 제거
moong23 4ad656e
Merge pull request #19 from Hooking-CEOS/dev
moong23 84ca1a3
feat: url rewrites를 통해 api_key 숨기기
moong23 83f1690
feat: uuid의 v1()을 통해 recoil id 중복 방지
moong23 1f3d0f1
Merge pull request #20 from Hooking-CEOS/refactor
moong23 ec3720d
Merge pull request #21 from Hooking-CEOS/dev
moong23 417e9d5
fix: opacity 적용한 timeout함수 로직 수정
moong23 a062b17
Merge pull request #22 from Hooking-CEOS/dev
moong23 c646cc9
docs: Update README.md
moong23 1b76b78
Merge pull request #23 from Hooking-CEOS/master
moong23 987b782
[chore]: 불필요한 파일 삭제
moong23 89e53cd
fix: mainContent에 type 부여해서 확장
moong23 b40ecad
Merge pull request #24 from Hooking-CEOS/fix/mainContent
moong23 3b39660
[etc]: 주석 작성
moong23 3a72d50
[refactor]: navbar에 필요없는 state제거, render 로직 수정
moong23 2cf62d2
[WIP] - Merge pull request #25 from Hooking-CEOS/fix/mainContent
moong23 2fdf249
feat: react-query 세팅
598669d
feat: searchbar 컴포넌트 추가
cde8301
feat: 키워드 검색, 검색 페이지 리스트 무한스크롤 쿼리 추가
d779bea
feat: movieCard 컴포넌트 추가
6c44ee9
feat: spacing, layout 컴포넌트 추가
39a139e
feat: 스켈레톤 추가
5dba080
feat: status에 따라 ui 분기처리
8f02b09
feat: target 위치 감지하는 useObserver훅 추가
ddc42a9
fix: 불필요한 스타일 제거
ca144c1
style: input 기본 스타일, 말줄임 스타일 추가
71c0b2c
feat: useInput 훅 추가
65a62dc
feat: constants 추가
13133dd
fix: navbar 충돌 해결
99283dd
[feat]: playButton 컴포넌트화
moong23 6d16d7e
[feat]: navigation 기능 추가
moong23 6d96ef8
[style]: style.css수정 및 사소한 style 수정
moong23 dd2345d
[feat]: mainContent 로직 수정
moong23 4773b52
[feat]: movieData 컴포넌트 추가
moong23 61eeab5
[WIP]: 주석 추가 및 TODO 정리
moong23 7f88498
[feat]: [id].js로 동적 라우팅 및 컴포넌트 렌더링
moong23 32fe444
Merge pull request #26 from Hooking-CEOS/fix/mainContent
moong23 5a24aed
fix: movie search api rewrites 추가
faa256d
fix: api url 수정
3b0646c
chore: layout head 태그 추가
1cc320f
fix: 상세페이지 detail/:id로 이동
a855ddc
feat: nav link 추가
2347ef5
chore: imgSrc constants로 분리
d87401f
[refactor]: index.js에 ISR적용 (24시간)
moong23 20f9b50
feat: ssr 적용 (진행중)
b5da87b
Merge pull request #27 from Hooking-CEOS/refactor/SSR,ISR
moong23 8c8508f
Merge branch 'feature/search' of https://github.com/Hooking-CEOS/next…
moong23 6a5b0ce
Merge pull request #28 from Hooking-CEOS/feature/search
moong23 dd63197
[WIP]: test
moong23 67525ee
Merge pull request #29 from Hooking-CEOS/test/ssr_test
moong23 7826082
fix: ssr 적용
5f494d4
fix: 같은 데이터만 불러오는 에러 수정
e18deb1
[feat]: ISR added to [id].js
moong23 cd53782
[feat]: skeleton structure added to movieData and mainContent
moong23 95281ca
Merge pull request #30 from Hooking-CEOS/feature/search
moong23 7c9c8ed
[Comment]: Added Annotations on Code
moong23 7faf032
[fix]: URL encoding via rewrites
moong23 afa1b1f
[fix]: Fixed randomizing poster logic
moong23 44e24a2
[fix]: Replacing Image on Error (404)
moong23 c3d63c8
Merge pull request #31 from Hooking-CEOS/dev
moong23 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,45 @@ | ||
import styled from "styled-components"; | ||
|
||
export const Wrapper = styled.div` | ||
display: flex; | ||
align-items: center; | ||
width: 100%; | ||
height: 76px; | ||
padding-right: 20px; | ||
color: white; | ||
background-color: #424242; | ||
|
||
& + & { | ||
margin-top: 10px; | ||
} | ||
|
||
.skeleton { | ||
display: flex; | ||
|
||
&-poster { | ||
width: 146px; | ||
height: 76px; | ||
background-color: #2e313d; | ||
} | ||
|
||
&-text { | ||
width: 150px; | ||
height: 20px; | ||
margin: 10px; | ||
background-color: #2e313d; | ||
flex: 1; | ||
} | ||
|
||
&-play { | ||
border-radius: 50%; | ||
background-color: #2e313d; | ||
width: 30px; | ||
height: 30px; | ||
} | ||
} | ||
`; | ||
|
||
export const MovieName = styled.span` | ||
padding: 20px; | ||
width: 150px; | ||
`; |
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,49 @@ | ||
import Link from "next/link"; | ||
import Image from "next/image"; | ||
import { useState, useRef } from "react"; | ||
import { Wrapper, MovieName } from "./movieCard.element"; | ||
import { FaRegPlayCircle } from "react-icons/fa"; | ||
import { LazyLoadImage } from "react-lazy-load-image-component"; | ||
import { useObserver } from "../../hooks/useObserver"; | ||
import useLocalStorage from "use-local-storage"; | ||
|
||
const MovieCard = ({ id, title, poster }) => { | ||
let imgSrc = "https://image.tmdb.org/t/p/w500"; | ||
|
||
const [visible, setVisible] = useState(false); | ||
const [scrollY, setScrollY] = useLocalStorage("movie_list_scroll", 0); | ||
const target = useRef(null); | ||
|
||
// DOM이 뷰포트 안에 보이는 경우에만 렌더링함 | ||
const onIntersect = ([entry]) => | ||
entry.isIntersecting ? setVisible(true) : setVisible(false); | ||
|
||
// threshold: 화면 양끝에서 10%만 보여줘도 onIntersect callback을 실행함 | ||
useObserver({ target, onIntersect, threshold: 0.1 }); | ||
|
||
return ( | ||
<Wrapper ref={target}> | ||
{visible && ( | ||
<> | ||
{/* Image보다 LazyLoadImage가 체감 속도가 빨라서 일단 이걸로 썼음 */} | ||
<LazyLoadImage | ||
alt={title} | ||
src={imgSrc + poster} | ||
style={{ objectFit: "cover" }} | ||
width="146" | ||
height="76" | ||
/> | ||
<MovieName className="text-ellipsis">{title}</MovieName> | ||
<Link href={`/search/${id}`}> | ||
<FaRegPlayCircle | ||
size={20} | ||
onClick={() => setScrollY(window.scrollY)} | ||
/> | ||
</Link> | ||
</> | ||
)} | ||
</Wrapper> | ||
); | ||
}; | ||
|
||
export default MovieCard; |
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.
옹,,, next/Image를 사용했는데, LazyLoadImage도 있군요,, 배워갑니다!!