-
Notifications
You must be signed in to change notification settings - Fork 16
[6주차] Teample 미션 제출합니다 #13
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
base: master
Are you sure you want to change the base?
Changes from all commits
c99c8cd
b5fe24d
3fcee9c
ffb3188
2466e93
9e48f50
0b8fb9e
d5c904f
0008b97
bc52b97
484108c
06a8c28
933a044
45e1c13
8ca9d5c
89b53d0
ea65062
ac27916
a09a04f
3f851c0
acd70b0
663d68a
e44c4c5
fa7be38
1f330b5
3fcbdab
efd845a
8b8da1f
6d13e8e
fd93590
ab8c15d
cf56508
46ce6a1
3c85360
799f007
4a4ce4c
f3249d1
d9ecbc8
f4da084
9399521
5d7ef11
342fed0
315e796
948e468
7168b69
42b11a8
650369a
642790c
806c93a
593c82d
3fdf03f
4817f4f
75e4d2b
909deda
ae9e18f
22d491f
97d97d4
f4a4857
3dabb72
c5446a7
148274d
989dcfa
092d961
4afd007
728a4f0
9465134
37fae06
c1c5d7f
0f85216
5717535
60af93c
7db110f
36ab23b
a9cfff7
17bbdf0
2a5a10e
bde3cfb
25e594b
36610ee
89787e6
8ef0976
dc1059a
9f7b167
491eca5
1a96c67
c6fa708
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "presets": ["next/babel"], | ||
| "plugins": [ | ||
| [ | ||
| "babel-plugin-styled-components", | ||
| { | ||
| "ssr": true, // SSR을 위한 설정 | ||
| "displayName": true, // 클래스명에 컴포넌트 이름을 붙임 | ||
| "pure": true // dead code elimination (사용되지 않는 속성 제거) | ||
| } | ||
| ] | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "extends": ["next/babel", "next/core-web-vitals"] | ||
| } |
| 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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "trailingComma": "es5", | ||
| "tabWidth": 2, | ||
| "semi": true, | ||
| "singleQuote": true | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "configurations": [ | ||
| { | ||
| "name": "macos-gcc-x64", | ||
| "includePath": ["${workspaceFolder}/**"], | ||
| "compilerPath": "/usr/bin/clang", | ||
| "cStandard": "${default}", | ||
| "cppStandard": "${default}", | ||
| "intelliSenseMode": "macos-gcc-x64", | ||
| "compilerArgs": [] | ||
| } | ||
| ], | ||
| "version": 4 | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "version": "0.2.0", | ||
| "configurations": [ | ||
| { | ||
| "name": "C/C++ Runner: Debug Session", | ||
| "type": "cppdbg", | ||
| "request": "launch", | ||
| "args": [""], | ||
| "stopAtEntry": true, | ||
| "cwd": "/Users/imchaeli/ch9eri/Documents/채리/CEOS/5주차/next-netflix-16th/nextflix", | ||
| "environment": [], | ||
| "program": "/Users/imchaeli/ch9eri/Documents/채리/CEOS/5주차/next-netflix-16th/nextflix/build/Debug/outDebug", | ||
| "internalConsoleOptions": "openOnSessionStart", | ||
| "MIMode": "gdb", | ||
| "externalConsole": true | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "C_Cpp_Runner.cCompilerPath": "/usr/bin/clang", | ||
| "C_Cpp_Runner.cppCompilerPath": "/usr/bin/clang++", | ||
| "C_Cpp_Runner.debuggerPath": "/usr/bin/lldb", | ||
| "C_Cpp_Runner.cStandard": "", | ||
| "C_Cpp_Runner.cppStandard": "", | ||
| "C_Cpp_Runner.msvcBatchPath": "", | ||
| "C_Cpp_Runner.warnings": ["-Wall", "-Wextra", "-Wpedantic"], | ||
| "C_Cpp_Runner.enableWarnings": true, | ||
| "C_Cpp_Runner.warningsAsError": false, | ||
| "C_Cpp_Runner.compilerArgs": [], | ||
| "C_Cpp_Runner.linkerArgs": [], | ||
| "C_Cpp_Runner.includePaths": [], | ||
| "C_Cpp_Runner.includeSearch": ["*", "**/*"], | ||
| "C_Cpp_Runner.excludeSearch": [ | ||
| "**/build", | ||
| "**/build/**", | ||
| "**/.*", | ||
| "**/.*/**", | ||
| "**/.vscode", | ||
| "**/.vscode/**" | ||
| ] | ||
| } |
| 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.js`. 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.js`. | ||
|
|
||
| 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. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| import styled from 'styled-components'; | ||
| import { RiHome2Line, RiSearchLine } from 'react-icons/ri'; | ||
| import { HiDownload } from 'react-icons/hi'; | ||
| import { BsList } from 'react-icons/bs'; | ||
| import { MdOutlineVideoLibrary } from 'react-icons/md'; | ||
| import { useRouter } from 'next/router'; | ||
| import { useRecoilState } from 'recoil'; | ||
| import { NowState } from '../../../states/states'; | ||
|
|
||
| const BtmNav = styled.footer` | ||
| width: 400px; | ||
| height: 8vh; | ||
| background-color: #121212; | ||
| display: flex; | ||
| justify-content: space-between; | ||
| align-items: center; | ||
| z-index: 998; | ||
| position: fixed; | ||
| bottom: 0; | ||
| left: 0; | ||
| right: 0; | ||
| margin: auto; | ||
| `; | ||
|
|
||
| const Icon = styled.div` | ||
| cursor: pointer; | ||
| color: ${(props) => (props.Isnow == props.id ? 'white' : '#8c8787')}; | ||
| // color : grey; | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| margin: auto; | ||
| a { | ||
| font-size: 10px; | ||
| } | ||
| :active { | ||
| color: white; | ||
| } | ||
| `; | ||
|
|
||
| const Footer = () => { | ||
| const routing = { 0: '/home', 1: '/search' }; | ||
| const [now, setNow] = useRecoilState(NowState); | ||
|
|
||
| const router = useRouter(); | ||
|
|
||
| const ChangeNow = (e) => { | ||
| setNow(e.currentTarget.id); | ||
| router.push(routing[e.currentTarget.id]); | ||
|
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.
|
||
| }; | ||
|
Member
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. 우와 각 id 값을 숫자로 주니까 코드가 되게 깔끔해지네요...! |
||
|
|
||
| const ChangeIsNow = (e) => { | ||
| setNow(e.currentTarget.id); | ||
| }; | ||
| return ( | ||
| <BtmNav> | ||
| <Icon id="0" Isnow={now} onClick={ChangeNow}> | ||
| <RiHome2Line size={25} /> | ||
| <a>Home</a> | ||
| </Icon> | ||
|
|
||
| <Icon id="1" Isnow={now} onClick={ChangeNow}> | ||
| <RiSearchLine size={25} /> | ||
| <a>Search</a> | ||
| </Icon> | ||
| <Icon id="2" Isnow={now} onClick={ChangeIsNow}> | ||
|
|
||
| <MdOutlineVideoLibrary size={25} /> | ||
| <a>Coming Soon</a> | ||
| </Icon> | ||
| <Icon id="3" Isnow={now} onClick={ChangeIsNow}> | ||
| <HiDownload size={25} /> | ||
| <a>Downloads</a> | ||
| </Icon> | ||
| <Icon id="4" Isnow={now} onClick={ChangeIsNow}> | ||
| <BsList size={25} /> | ||
| <a>More</a> | ||
| </Icon> | ||
| </BtmNav> | ||
| ); | ||
| }; | ||
|
|
||
| export default Footer; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import styled from 'styled-components'; | ||
| import Footer from '../Footer'; | ||
|
|
||
| const Box = styled.div` | ||
| position: relative; | ||
| display: flex; | ||
| width: 400px; | ||
| height: 100vh; | ||
| background-color: black; | ||
| margin: auto; | ||
| min-width:375px | ||
| min-height: 100%; | ||
| padding-bottom: 67px; | ||
| `; | ||
| const Children = styled.div` | ||
| position: absolute; | ||
| width: 100%; | ||
| height: 100%; | ||
| overflow: scroll; | ||
| z-index: 997; | ||
| padding-bottom: 8vh; | ||
| `; | ||
|
|
||
| const Layout = ({ children }) => { | ||
| return ( | ||
| <> | ||
| <Box> | ||
| <Children>{children}</Children> | ||
| </Box> | ||
|
Member
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. 깔끔하네요...... 🙀 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. 완전 깔끔,,, |
||
| <Footer /> | ||
| </> | ||
| ); | ||
| }; | ||
|
|
||
| export default Layout; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| import styled from 'styled-components'; | ||
| import { AiOutlinePlus, AiOutlineInfoCircle } from 'react-icons/ai'; | ||
| import { BsFillPlayFill } from 'react-icons/bs'; | ||
|
|
||
| const BtnBox = styled.div` | ||
| display: flex; | ||
| justify-content: space-evenly; | ||
| height: 45px; | ||
| margin-top: 10px; | ||
| `; | ||
|
|
||
| const IconBox = styled.div` | ||
| cursor: pointer; | ||
| color: #ffffff; | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| margin: auto; | ||
| a { | ||
| font-size: 10px; | ||
| } | ||
| `; | ||
|
|
||
| const PlayBox = styled.div` | ||
| display: flex; | ||
| align-items: center; | ||
| width: 110px; | ||
| background-color: #c4c4c4; | ||
| border-radius: 5.625px; | ||
| color: black; | ||
| justify-content: space-evenly; | ||
|
|
||
| a { | ||
| font-size: 20px; | ||
| } | ||
| `; | ||
|
|
||
| const MidBtn = () => { | ||
| return ( | ||
| <BtnBox> | ||
| <IconBox> | ||
| <AiOutlinePlus size={25} /> | ||
| <a>My List</a> | ||
| </IconBox> | ||
| <PlayBox> | ||
| <BsFillPlayFill size={25} className="playBtn" /> | ||
| <a>Play</a> | ||
| </PlayBox> | ||
| <IconBox> | ||
| <AiOutlineInfoCircle size={25} /> | ||
| <a>Info</a> | ||
| </IconBox> | ||
| </BtnBox> | ||
| ); | ||
| }; | ||
|
|
||
| export default MidBtn; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| import styled from 'styled-components'; | ||
| import Logo from '../../../public/images/Netflix-logo.png'; | ||
| import Image from 'next/image'; | ||
|
|
||
| const TopNavbar = styled.nav` | ||
| position: absolute; | ||
| margin-top: 10%; | ||
| width: 100%; | ||
| height: 8%; | ||
| display: flex; | ||
| justify-content: space-between; | ||
| opacity: 100; | ||
| margin-left: 10px; | ||
| margin-right: 20px; | ||
| z-index: 998; | ||
|
|
||
| a { | ||
| text-align: center; | ||
| color: white; | ||
| height: 54px; | ||
| margin-right: 25px; | ||
| font-weight: 400; | ||
| font-size: 17.1968px; | ||
| cursor: pointer; | ||
| margin-top: 10px; | ||
| } | ||
| `; | ||
|
|
||
| const Home = styled.div` | ||
| cursor: pointer; | ||
| margin-left: 10px; | ||
| margin-top: 0px; | ||
| `; | ||
|
|
||
| const TopNav = () => { | ||
| return ( | ||
| <TopNavbar> | ||
| <Home> | ||
| <Image src={Logo} alt="netflix logo" width={30} height={40} /> | ||
| </Home> | ||
| <a>TV Shows</a> | ||
| <a>Movies</a> | ||
| <a>My List</a> | ||
| </TopNavbar> | ||
| ); | ||
| }; | ||
| export default TopNav; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| /** @type {import('next').NextConfig} */ | ||
| const nextConfig = { | ||
| reactStrictMode: true, | ||
|
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. 저는 console.log()가 렌더링 2번 되서 아래 글 보고 reactStrictMode false로 바꿨는데 잘 되시나요 ㅠㅠ 나만 그런건가 ㅠㅠ |
||
| }; | ||
|
|
||
| module.exports = nextConfig; | ||
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.
오 이런식으로 현재 선택되었는지를 알 수도 있겠네요!! 아직
recoil이 익숙하지 않아서 생각지도 못했어요..router.pathname요 방법도 참고해보시면 좋을 것 같아요 -!!