[7주차] Team 포토그라운드 강다혜 & 이희원 미션 제출합니다.#4
[7주차] Team 포토그라운드 강다혜 & 이희원 미션 제출합니다.#4hiwon-lee wants to merge 31 commits intoCEOS-Developers:masterfrom
Conversation
왜냐하면... 강다혜가 server action을 또 잘못 이해하고 있었기 때문이죠~ 하하 |
| import { dirname } from "path"; | ||
| import { fileURLToPath } from "url"; | ||
| import { FlatCompat } from "@eslint/eslintrc"; | ||
|
|
||
| const __filename = fileURLToPath(import.meta.url); | ||
| const __dirname = dirname(__filename); | ||
|
|
||
| const compat = new FlatCompat({ | ||
| baseDirectory: __dirname, | ||
| }); | ||
|
|
||
| const eslintConfig = [ | ||
| ...compat.extends("next/core-web-vitals", "next/typescript"), | ||
| { | ||
| rules: { | ||
| ...prettier.rules, // Prettier 규칙 추가 | ||
| }, | ||
| }, | ||
| ]; | ||
|
|
||
| export default eslintConfig; |
There was a problem hiding this comment.
| import { dirname } from "path"; | |
| import { fileURLToPath } from "url"; | |
| import { FlatCompat } from "@eslint/eslintrc"; | |
| const __filename = fileURLToPath(import.meta.url); | |
| const __dirname = dirname(__filename); | |
| const compat = new FlatCompat({ | |
| baseDirectory: __dirname, | |
| }); | |
| const eslintConfig = [ | |
| ...compat.extends("next/core-web-vitals", "next/typescript"), | |
| { | |
| rules: { | |
| ...prettier.rules, // Prettier 규칙 추가 | |
| }, | |
| }, | |
| ]; | |
| export default eslintConfig; | |
| import { dirname } from "path"; | |
| import { fileURLToPath } from "url"; | |
| import { FlatCompat } from "@eslint/eslintrc"; | |
| import prettierConfig from "eslint-config-prettier"; | |
| const __filename = fileURLToPath(import.meta.url); | |
| const __dirname = dirname(__filename); | |
| const compat = new FlatCompat({ | |
| baseDirectory: __dirname, | |
| }); | |
| const eslintConfig = [ | |
| ...compat.extends("next/core-web-vitals", "next/typescript"), | |
| { | |
| rules: { | |
| ...prettierConfig.rules, // Prettier 규칙 추가 | |
| }, | |
| }, | |
| ]; | |
| export default eslintConfig; | |
이렇게 코드를 변경해보시면 어떨까요? 그 전에 save dev 옵션으로 eslint-config-prettier 설치해주시는 것 잊지 마시구요!
hae2ni
left a comment
There was a problem hiding this comment.
너무 꼼꼼하게 잘 해주신 것 같아요!!! 최고,, 저는 사실 날래날래(?) 해버려가지구ㅎㅎㅎ 반성하구 갑니다ㅠㅠ!
There was a problem hiding this comment.
왤케 꼼꼼해들 당신,,,,,,,,,, 약간 반성하게 되네요,,,, msw라니,,,
| font-size: ${({ theme }) => theme.typography.body2_rg.fontSize}; | ||
| font-weight: ${({ theme }) => theme.typography.body2_rg.fontWeight}; | ||
| line-height: ${({ theme }) => theme.typography.body2_rg.lineHeight}; |
| font-size: ${({ theme }) => theme.typography.body2_rg.fontSize}; | ||
| font-weight: ${({ theme }) => theme.typography.body2_rg.fontWeight}; | ||
| line-height: ${({ theme }) => theme.typography.body2_rg.lineHeight}; |
There was a problem hiding this comment.
| font-size: ${({ theme }) => theme.typography.body2_rg.fontSize}; | |
| font-weight: ${({ theme }) => theme.typography.body2_rg.fontWeight}; | |
| line-height: ${({ theme }) => theme.typography.body2_rg.lineHeight}; | |
| ${({ theme }) => theme.typography.body2_rg}; | |
| size, | ||
| title, | ||
| content, | ||
| voteCount, | ||
| selected, | ||
| onClick, |
There was a problem hiding this comment.
저는 props가 많을 땐 그냥 props를 받은 뒤에 구조분해할당 해주는 편인데 요 방법도 추천드려요!
| import Title from './Title'; | ||
| import SubTitle from './SubTitle'; | ||
| import Back from './Back'; | ||
|
|
billy0904
left a comment
There was a problem hiding this comment.
마지막 과제까지 정말 수고 많으셨습니다!
포토그라운드 컨셉에 맞는 UI 색상 사용이 인상적이었네요ㅎㅎ
늘 응원하겠습니다!
(+) 우리 백엔드 한솔이 아니고 한슬인데.....🥹🥹 db에 한솔이라고 들어가있나봐
| <PhoneIcon size="1.5rem" /> | ||
| <Input placeholder="전화번호" type="number" /> | ||
| </InputContainer> | ||
| <Message variant="caption1_rg">{`'-' 없이 입력해주세요`}</Message> |
| gap: 1rem; | ||
|
|
||
| padding: 0.5rem 1rem; | ||
| background: ${({ theme }) => theme.colors.gray[900]}; |
There was a problem hiding this comment.
import 없이 theme을 이렇게 사용하는 방법도 있네요!?😯 요즘 더 나은 theme 사용법을 익히고 있어서...ㅎㅎ 배워가겠습니다!
|
|
||
| return ( | ||
| <Container action={handleSubmit}> | ||
| <Text variant="header1">데모데이 파트장 투표</Text> |
| candidateList, | ||
| }: { | ||
| candidateList: any[]; | ||
| }) { | ||
| const [selectedCandidate, setSelectedCandidate] = useState<Candidate | null>( | ||
| null, | ||
| ); |
There was a problem hiding this comment.
위에서는 candidateList 타입을 string[]으로 정의했는데 여기서는 any 로 설정하신 이유가 따로 있을까용?
ryu-won
left a comment
There was a problem hiding this comment.
과제하시느라 수고 많으셨습니다!
재사용 컴포넌트들 정리가 잘되어있었는데, 저는 컴포넌트로 따로 안만들고 한페이지에 다 때려박아서 ... 제 코드를 조금 반성하게 되었습니다!
| @@ -0,0 +1,49 @@ | |||
| 'use server'; | |||
| const cookieStore = await cookies(); | ||
| const accessToken = cookieStore.get('access_token')?.value!; | ||
|
|
There was a problem hiding this comment.
저희는 로컬스토리지에 저장해서 가져왔는데 서버에 쿠키로 직접 저장할수도 있군오!
| if (result && typeof window !== 'undefined') { | ||
| window.alert(result); | ||
| } |
There was a problem hiding this comment.
해당 페이지는'use client'; 라서 window객체를 확인하는 typeof window !== 'undefined' 코드가 불필요하지 않을까용?
| const formData = new FormData(); | ||
| formData.set('leaderId', teamName); | ||
|
|
There was a problem hiding this comment.
저였다면 하나하나씩 불러왔을텐데,, 한번에 사용할 컴포넌트들을 이렇게 객체로 묶어주는 방법도 있군요..!
😀😀next-vote-20th : 배포링크😀😀
드디어 20기 마지막 과제가 끝났네요..
하지만 이제부터 포토그라운드 개발이 본격적으로 시작되겠죠?
앞으로의 개발에서 발생하는 크고 작은 문제들이 저희들을 괴롭혀 두피까지 열이오르는 일들 투성이겠지만, 그럼에도 불구하고 프로젝트가 부디 잘 마무리되었으면 정말정말 좋겠어요.
사실 이번 과제도 그런 일들이 계속 일어나서 힘들었답니다. 특히 로컬에서는 잘 되던 에러처리가 배포하면 안되는 문제가 있었습니다.
대체 왜이럴까요? 😀😀 진짜 이해불가.. 계속 무언가 시도해보고 있지만 일단 마감기한이 다와가서 해결하지 못한 채 제출하게 된 것이 안타까울 따름입니다..ㅜ~ㅜ (다혜가 다른방법으로 해결했습니다)
끝으로 세오스에서 한 학기동안 대단한 분들과 생각과 고민을 나누며 공부할 수 있어서 너무나도 영광이었습니다..ㅎㅎ 부족하디 부족한 저는 아직도 배우고 공부할 것들 투성이라 더 공부를 해야할 것 같습니다..ㅎ
암틍간~`😀 CEOS 프론트 20기분들과 운영진분들 다들 정말 수고 많으셨습니다ㅋㅋㅎ 😀😀😀😀😀😀😀😀😀😀😀😀😀새해복많이받으쎄용ㅋㅎ~