-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat/#12 #15
base: master
Are you sure you want to change the base?
Conversation
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.
yeah
import RightTeam from './betting-teams/RightTeam'; | ||
import LeftTeam from './betting-teams/LeftTeam'; | ||
import RightTeam from './RightTeam'; | ||
import LeftTeam from './LeftTeam'; | ||
|
||
function BettingDetail(props){ |
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.
구조분해할당쓰는건어떠새우
|
||
function BettingDetail(props){ | ||
return ( | ||
<div id={"BettingDetail"}> | ||
<LeftTeam info={props.LeftTeam} /> | ||
<LeftTeam info={props.teams.LeftTeam} /> | ||
<div className='line-box'> | ||
<div className="line"></div> |
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.
셀프클로징쓰는건어떠새우
@@ -16,12 +21,17 @@ function RightTeam(props){ | |||
background: '#F5019B', | |||
}; | |||
|
|||
while (totalBettingMoney >= 1000){ | |||
totalBettingMoney = totalBettingMoney / 1000; | |||
UnitIndex++; |
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.
++쓰지마새우
|
||
if (props.hour){ | ||
deadline += `${props.hour}시간 ${props.minute}분`; | ||
} else if (props.minute){ | ||
deadline += `${props.minute}분`; | ||
if (props.title.hour){ | ||
deadline += `${props.title.hour}시간 ${props.title.minute}분`; | ||
} else if (props.title.minute){ | ||
deadline += `${props.title.minute}분`; | ||
} |
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.
switch로 쓰는건 어떠새우
|
||
#BettingList .event { | ||
display: flex; | ||
flex-direction: row; |
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.
flex-direction은 display flex 쓰면 기본값임
{ | ||
Object.values(bettings).map((betting, index) => { | ||
return ( | ||
<BettingSet key={index} betting={betting} /> | ||
); | ||
}) | ||
} |
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.
저기에서 뭐가 문제인지 알려주실 수 있나요? 혹시 json 관련해서 인가요?
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.
여기 이 파일에 json을 이용해서 betting-set 컴포넌트을 활용한 코드가 있습니다.
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.
feat/#12 에서 개발하실때 app.jsx에서 실제로 적용시킨 다음에 개발해 주시고 거기서 실행된다는것을 보여주시면 됩니다.
import BettingTitle from '../title/BettingTitle'; | ||
import BettingDetail from './../betting-teams/BettingDetail'; | ||
|
||
function BettingSet({ betting }){ |
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.
아마 실제로 사용하게 된다면 이 함수가 호출되고 난 뒤에 데이터를 불러올것 같은데 불러오는 코드는 어디있죠?
그리고 지금 DB를 연결할 수 없어서 연결해서 데이터를 불러온것처럼 코드 작성을 요청드렸었는데 그 코드 어디있죠..?
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로 데이터를 끌고 와서 보여줄 거로 저는 생각을 하고 개발을 하였는데 이 함수에서 데이터를 호출시키는 거 였나요?
|
||
return ( | ||
<div id={"BettingTitle"}> | ||
<h4 className="main-title">{props.title}</h4> | ||
<h4 className="main-title">{title ? title.title : 'BTO 배팅'}</h4> |
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.
아.. 진짜 임의 데이터를 넣으셨군요...
퍼블리싱 할때는 DB 연결됬다고 가정한 후 코드를 작성해 주세요.
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.
알겠습니다.
betting-title과 betting-detail 컴포넌트를 합친 betting-set 컴포넌트를 만들고 분리시켜서 풀리퀘합니다.
betting-set 컴포넌트를 참고할 사용법은 List 페이지에 있습니다.