-
Notifications
You must be signed in to change notification settings - Fork 10
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
[7주차] 셰어마인드 미션 제출합니다. #7
base: main
Are you sure you want to change the base?
Conversation
- package.json, tsconfig.json 설정, 폰트 설정, custom.d.ts module 선언
build: eslintrc delete cr 해결
[feat] 공통컴포넌트 추가, 기초세팅, 회원가입 스타일링 완료
[feature] 회원가입 구현완료
전체적인 디자인 수정 및 투표결과 UI view 구현
[feature] 투표 후보 선택까지 완료
Fix: 투표 선택 오류 해결
Fix: 투표 선택 오류 해결2
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.
전체적으로 흥미로운 코드였습니다. ㅎㅎ 세부동작들을 모두 다른 파일로 빼서 작성하셔서 수고가 많으셨겠어요!! 시간관계상 양질의 코드리뷰를 못해드린 점 죄송하고 수고하셨습니다 ㅎㅎ
|
||
export const getInstance = async (url: string, params?: any, header?: any) => { | ||
try { | ||
const data = await instance.get(url, params); | ||
return data; | ||
} catch (error) { | ||
return error; | ||
} | ||
}; | ||
export const postInstance = async (url: string, body: any, params?: any) => { | ||
try { | ||
const data = await instance.post(url, body, params); | ||
return data; | ||
} catch (error) { | ||
return error; | ||
} | ||
}; | ||
export const putInstance = async (url: string, body: any, params: any) => { | ||
try { | ||
const data = await instance.put(url, body, params); | ||
return data; | ||
} catch (error) { | ||
return error; | ||
} | ||
}; | ||
|
||
export const patchInstance = async (url: string, body: any, params: any) => { | ||
try { | ||
const data = await instance.patch(url, body, params); | ||
return data; | ||
} catch (error) { | ||
return error; | ||
} | ||
}; | ||
|
||
export const deleteInstance = async (url: string) => { | ||
try { | ||
const data = await instance.delete(url); | ||
return data; | ||
} catch (error) { | ||
return error; | ||
} | ||
}; |
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.
메소드를 제외한 코드가 중복되므로 외부에서 method 도 매개변수로 받아온 뒤 try 문에서 실행되는 메소드를 method의 값에 따라 분기처리해도 좋을 것 같아요 ㅎㅎ
src/assets/images/FE.png
Outdated
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.
이미지 귀엽네욬ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ
<VoteItem | ||
key={index} |
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.
key를 index 단독으로 지정하는 것을 추천하지 않는다고 하는데 한번 알아보시면 좋을 것 같아용 ㅎㅎ
@@ -0,0 +1,73 @@ | |||
import { useState } from 'react'; |
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.
전체적으로 세부동작을 파일로 빼서 정의하신 점 좋은 것 같아요 ㅎㅎ
const [cookies, setCookie, removeCookie] = useCookies([ | ||
'userEmail', | ||
'userPassword', | ||
]); | ||
|
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.
쿠키 사용도 시도하셨네요!! 저희는 시간이 없어 도입을 못했지만 프로젝트에서 도입해보겠습니다 ㅎㅎ
@@ -0,0 +1,28 @@ | |||
@font-face { |
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.
폰트스타일 따로 파일로 정리하신 것 좋은 것 같아요~~
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.
처음으로 백엔드 분들이랑 협업하면서 과제 하시느라 수고하셨습니다~ 다양한 재미 요소와 창의적인 부분들을 많이 넣어주셔서 리뷰하는데 즐거웠습니다! 고생하셨어요~~
import styled from 'styled-components'; | ||
import { PartCandidateArrayType } from 'utils/type'; | ||
|
||
function VoteResultBack() { |
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.
VoteResultFront와 거의 대부분 겹치는 컴포넌트인 것 같아요! 추상화해서 하나의 컴포넌트로 만들어도 좋을 것 같습니다~~
); | ||
useEffect(() => { | ||
const fetchCandidateDemo = async () => { | ||
const res: any = await getDemoday(); |
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.
타입스크립트의 장점을 극대화하려면 any를 지양하고 최대한 타입 지정해주는 것이 좋을 것 같아요~~
const partSelect = useCustomSelect('', 'part'); | ||
const teamSelect = useCustomSelect('', 'team'); |
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.
드롭다운 선택을 위한 커스텀훅 작성하신거 좋은 것 같습니다~!
return error; | ||
} | ||
}; | ||
export const postInstance = async (url: string, body: any, params?: any) => { |
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.
param이나 body 부분도 특정 형태의 데이터를 보내도록 어느정도 정해져있기 때문에 구체적으로 타입지정을 하게 된다면 api 통신함에 있어서의 에러를 방지할 수 있을 것 같습니다~~
<TopRankBarList> | ||
<SecondBar> | ||
<SecondWho> | ||
<Name>{candidateBE[1]?.name}</Name> | ||
<Team>{candidateBE[1]?.team}</Team> | ||
</SecondWho> | ||
<Number>2</Number> | ||
</SecondBar> | ||
<FirstBar> | ||
<Number>1</Number> | ||
<FirstWho> | ||
<Name style={{ color: 'gold' }}>{candidateBE[0]?.name}</Name> | ||
<Team>{candidateBE[0]?.team}</Team> | ||
</FirstWho> | ||
</FirstBar> | ||
<ThirdBar> | ||
<Number>3</Number> | ||
<ThirdWho> | ||
<Name>{candidateBE[2]?.name}</Name> | ||
<Team>{candidateBE[2]?.team}</Team> | ||
</ThirdWho> | ||
</ThirdBar> | ||
</TopRankBarList> |
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.
이부분 직접 아이디어 내서 디자인하신거 되게 이쁜 것 같아요 짱짱!!
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.
고생하셨습니다 뛰어난 코드를 보니, 리뷰할 건 많이 없었지만 ㅠ 많이배워갑니다 고생하셨어요 ~~~ 디자인 짱
// setSelectedCandIdFE(-1); | ||
const result = window.confirm( | ||
'투표를 행사할 수 있는 권리는 한 번이며, 번복이 불가능합니다. \n이대로 진행하시겠습니까?', | ||
); |
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.
꼼꼼하게 방지해놓으신게 멋지십니다
Fix: 데모데이 투표 겹치는 오류 해결
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.
디자인도 예쁘고 재밌는 요소가 많아서 즐겁게 코드리뷰했어요:)수고하셨습니다!
await postInstance('/email', body); | ||
//로그인 아이디 중복 체크 | ||
export const postCheckId = async (body: any) => | ||
await postInstance('/user/loginId', body); |
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.
이렇게 정리하니까 postInstance 한 눈에 보기 좋은 것 같습니다! 배워가용
alert('error'); | ||
return; | ||
} | ||
console.log(value); |
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.
console.log는 빼주셔도 좋을 것 같아용
else setMessage('팀을 선택해주세요'); | ||
} else { | ||
setBgColor('#ffffff'); | ||
setBdColor('#cccccc'); |
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.
뒷배경 바뀌는 디테일 너무 좋은 것 같습니다!
배포주소
React-vote
디자인
CEOS 홈페이지 베끼기 ㅎㅎ..
피그마 링크
구현한 것
협업 과정
백엔드에서 Swagger 를 통하여 API 명세서를 잘 만들어주었고, 운이 좋게 명세서 안에서 작업이 잘 이루어졌던 거 같습니다.
느낀 점
전체적으로 책이 넘겨지는 것 같은 트랜지션을 주려고 한 페이지에 컴포넌트를 우겨넘은 감이 있는데, 시간적으로 여유가 없어서 구현을 못한 게 아쉬웠습니다.