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

[5주차] diaMEtes 미션 제출합니다. #7

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0722d1d
[Set] create-next-app
seondal Nov 8, 2022
e7aa6c5
chore : 폴더 구조 변경
heeeesoo Nov 9, 2022
718b2ef
feat : footer 기능
heeeesoo Nov 10, 2022
26cb3e0
feat : footer에 router 추가
heeeesoo Nov 10, 2022
86f634d
test : home 페이지에 movie api 적용해보기
heeeesoo Nov 10, 2022
b6bd0be
feat : nowPlayingMovies api data 불러오기 테스트
heeeesoo Nov 11, 2022
e2b5931
feat : nowPlaying에 movie image 추가
heeeesoo Nov 11, 2022
cbe7100
feat : home 페이지에 top rated movie list 추가
heeeesoo Nov 11, 2022
d889118
feat : popular movie 홈페이지에 추가
heeeesoo Nov 11, 2022
eab70b3
chore : home 페이지 스타일 수정
heeeesoo Nov 11, 2022
1d51cca
feat : home 페이지 중간 바 추가
heeeesoo Nov 11, 2022
208ff67
feat : header 추가
heeeesoo Nov 11, 2022
88bc19d
fix : 화면 상단 맞추기
heeeesoo Nov 11, 2022
9d574c0
fix : 사진 배경으로 옮김
heeeesoo Nov 11, 2022
2af09da
Merge pull request #1 from diaFEtes/heeeesoo
heeeesoo Nov 11, 2022
52bf317
feat : get top rated movies
seondal Nov 11, 2022
b7750ac
feat : 검색페이지 -> 상세페이지 연결
seondal Nov 11, 2022
dd7bfa4
feat : 상세페이지 구현
seondal Nov 11, 2022
9d65c0c
refact : search 페이지 getServerSideProps()
seondal Nov 11, 2022
da0101b
refact : movies api
seondal Nov 11, 2022
137a270
refact : home 페이지 getServerSideProps 방식 변경
seondal Nov 11, 2022
8a14858
refact : 폴더 구조 변경 & fix : 푸터 새로고침시 스타일 적용 안되는 오류 수정
seondal Nov 11, 2022
b39d18b
del : 불필요한 import 삭제
seondal Nov 11, 2022
9e44cd5
del Layout.tsx
seondal Nov 11, 2022
a5f5075
fix : 로고 화면에서 푸터가 보이는 현상 제거
seondal Nov 11, 2022
86a466b
refact : styled-component 전부 삭제 -> <style jsx/> 형식으로 변경
seondal Nov 11, 2022
133e534
style : Layout style 설정
seondal Nov 11, 2022
ca96436
edit : footer styled-components 삭제
seondal Nov 11, 2022
190afad
Feat : 메인페이지 -> 영화 상세 페이지 연결
seondal Nov 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/components/common/Layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { useRouter } from "next/router";
import Footer from "./Footer";

interface LayoutProps {
children?: JSX.Element;
}

export default function Layout({ children }: LayoutProps) {
const router = useRouter();
return (
<>
{children}
{router.pathname !== "/" && <Footer />}
Copy link
Member

Choose a reason for hiding this comment

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

오...되게 신박한 방법이네요

</>
);
}
2 changes: 0 additions & 2 deletions src/interface.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export interface CustomPageProps {}

export interface IFooter {
alt: string;
name: string;
Expand Down
13 changes: 5 additions & 8 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import "../../styles/globals.css";
import type { AppProps } from "next/app";
import React from "react";
import { CustomPageProps } from "../interface";
import Footer from "../components/common/Footer";
import Layout from "../components/common/Layout";

export default function App({
Component,
pageProps,
}: AppProps<CustomPageProps>) {
export default function App({ Component, pageProps }: AppProps) {
return (
<>
<Component {...pageProps} />
<Footer />
<Layout>
<Component {...pageProps} />
</Layout>
</>
);
}
1 change: 0 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default function Home() {
const timer = setTimeout(() => {
router.push("/home");
}, 3100);

return () => {
clearTimeout(timer);
};
Expand Down