Repository navigation
[v1.2.1] Update 20231026
[v1.2.1] Update 20231026
-
const [scrollHeight, setScrollHeight] = useState(window.innerHeight); useLayoutEffect(() => { setScrollHeight(document.documentElement.scrollHeight); }, [movieData, pagingData, loading]); return ( <> <BgImageContainer scrollHeight={scrollHeight}></BgImageContainer>
useState를 사용 후 styledComponent에 props를 넘김
export const BgImageContainer = styled.div` <!-- 생략 --> height: ${(props) => props.scrollHeight}px; `
받아온 props.scrollHeight 적용
-
데이터 수정 및 이미지 public폴더에 저장 v1.2.1 영화 데이터 주소