-
Notifications
You must be signed in to change notification settings - Fork 1
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
[#33] 쿠폰 조회 레이아웃 추가 & 일부 객실 리스트 목록 추가 #46
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
고생하셨습니다..!
} | ||
|
||
// api 데이터 타입 | ||
export interface CouponLitResponse { |
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.
CouponLitResponse 오타난 것 같습니다!
CouponListResponse
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 [resisterDateClick, setResisterDateClick] = useState<string>('1년'); | ||
const [categoryTab, setCategoryTab] = useState<string>('전체'); |
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.
타입 추론이 되면서 '1년', '전체'를 보고 개발자도 쉽게 알 수 있는 타입의 경우 타입 명시를 안하셔도 충분할 것 같습니다!
const [resisterDateClick, setResisterDateClick] = useState('1년');
const [categoryTab, setCategoryTab] = useState('전체');
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,224 @@ | |||
import styled from '@emotion/styled'; | |||
import theme from '@styles/theme'; |
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
import styled from '@emotion/styled';
// 내부 프로젝트 파일 import
import theme from '@styles/theme';
const CouponStatus = styled.div` | ||
width: 50px; | ||
height: 22.927px; | ||
|
||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: 10px; | ||
border-radius: 22.927px; | ||
color: #757676; | ||
background: ${theme.colors.white}; | ||
`; |
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 CouponStatus = styled.div`
width: 50px;
height: 22.927px;
border-radius: 22.927px;
display: flex;
align-items: center;
justify-content: center;
font-size: 10px;
color: #757676;
background: ${theme.colors.white};
`;
css 컨벤션 통일 부탁드립니다!
import { useState } from 'react'; | ||
import styled from '@emotion/styled'; | ||
import theme from '@styles/theme'; | ||
|
||
import toggleOnIcon from '@assets/icons/ic-couponlist-toggleOn.svg'; | ||
import toggleOffIcon from '@assets/icons/ic-couponlist-toggleOff.svg'; | ||
import { ToggleStyleProps } from '@/types/couponList'; |
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
import { useState } from 'react';
import styled from '@emotion/styled';
// 프로젝트 내부 파일 import
import toggleOnIcon from '@assets/icons/ic-couponlist-toggleOn.svg';
import toggleOffIcon from '@assets/icons/ic-couponlist-toggleOff.svg';
import { ToggleStyleProps } from '@/types/couponList';
import theme from '@styles/theme';
import styled from '@emotion/styled'; | ||
import theme from '@styles/theme'; | ||
|
||
import centerIcon from '@assets/icons/ic-couponlist-center.svg'; |
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
import styled from '@emotion/styled';
// 프로젝트 내부 파일 import
import theme from '@styles/theme';
import centerIcon from '@assets/icons/ic-couponlist-center.svg';
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.
앗 제가 theme 파일을 외부로 착각했네요 😂 신경써서 컨벤션 주의하겠습니다~! 모두 수정하였습니다.
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.
진주님 빌드도 실패로 뜨는데 github actions 확인 후 에러 해결 부탁드립니다!
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.
api 응답 타입까지 추가해주셨네요! 수고많으셨습니다!
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: 10px; | ||
border-radius: 22.927px; | ||
color: ${theme.colors.white}; | ||
background: #404446; |
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.
넵! 수정하였습니다!
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.
조회도 레이아웃 작업 많으셨을텐데 😢 수고하셨습니다!!
setIsToggle(!isToggle); | ||
}; | ||
return ( | ||
<CouponContainer isToggle={isToggle}> |
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.
<CouponContainer $isToggle={isToggle}>
스타일링을 위해 prop을 넘길 때는 prop명에 prefix로 $ 기호
를 붙여야되는 걸로 알고있습니다..!
$없이 텍스트로만 작성하면 HTML 요소의 속성이라고 인식하기 때문입니다.
즉, 해당 prop은 HTML 요소의 속성이 아닌 styled를 위해 사용하는 것임을 알려주기 위해 사용한다고 볼 수 있습니다.
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.
헉 그래서 모두 $를 붙이고 계셨군요... 다 모두 $ 기호 붙여서 수정하였습니다!
<TabName>전체</TabName> | ||
<TabCount>8</TabCount> | ||
<TabCount categoryTab={categoryTab === '전체'}>8</TabCount> |
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.
이 부분도 접두사 $ 붙여주시면 좋을 것같습니다!
다른 부분에도 style을 위한 prop이 있는지 확인해보시면 좋을 것같습니다!
close #33
Description
-> useRef 사용하여 리스트 영역 밖 클릭시 닫히도록
-> 객실 이름 10글자 까지만 보이고 나머지 ... 처리
유의할 점 및 ETC (Optional)
스크린샷 (Optional)