-
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?
Feat/#12 #15
Changes from 12 commits
344381c
a316920
23705cc
f15c49a
849742d
d078566
db52a58
0d15c98
6422178
8f7e26d
87fdd28
15cd3ad
87de842
1b25ddd
7ac2647
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
.App { | ||
width: 100vi; | ||
height: 100vh; | ||
height: 100dvh; | ||
background-color: #1F2329; | ||
} | ||
display: flex; | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react'; | ||
import './bettingDetail.css'; | ||
import RightTeam from './RightTeam'; | ||
import LeftTeam from './LeftTeam'; | ||
|
||
function BettingDetail({ teams }){ | ||
return ( | ||
<div id={"BettingDetail"}> | ||
<LeftTeam info={teams.LeftTeam} /> | ||
<div className='line-box'> | ||
<div className="line" /> | ||
</div> | ||
<RightTeam info={teams.RightTeam} /> | ||
</div> | ||
); | ||
} | ||
|
||
export default BettingDetail; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import './bettingSet.css' | ||
import BettingTitle from '../title/BettingTitle'; | ||
import BettingDetail from './../betting-teams/BettingDetail'; | ||
|
||
function BettingSet({ betting }){ | ||
return ( | ||
<div id="BettingSet" className="BettingSet"> | ||
<BettingTitle title={betting.title} /> | ||
<div className='emptyspace'></div> | ||
<BettingDetail teams={betting.teams} /> | ||
</div> | ||
); | ||
} | ||
|
||
export default BettingSet; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#BettingSet { | ||
width: 22.5rem; | ||
height: 13.6rem; | ||
} | ||
|
||
#BettingSet .emptyspace { | ||
width: 22.5rem; | ||
height: 0.25rem; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
import './bettingTitle.css' | ||
|
||
function BettingTitle(props) { | ||
let deadline = ``; | ||
function BettingTitle({ title }) { | ||
let deadline; | ||
|
||
if (props.hour){ | ||
deadline += `${props.hour}시간 ${props.minute}분`; | ||
} else if (props.minute){ | ||
deadline += `${props.minute}분`; | ||
} | ||
switch(true) { | ||
case !!title.hour: | ||
deadline = `${title.hour}시간 ${title.minute}분`; | ||
case !!title.minute: | ||
deadline = `${title.minute}분`; | ||
default: | ||
deadline = '0시간 0분'; | ||
}; | ||
|
||
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 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. 알겠습니다. |
||
<p className="deadline">{deadline} 후에 마감이 됩니다</p> | ||
</div> | ||
); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#BettingList { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
#BettingList .event { | ||
display: flex; | ||
} | ||
|
||
#BettingList .pageTitle { | ||
color: #FFF; | ||
text-align: center; | ||
font-family: WAGURI; | ||
font-size: 1.25rem; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: normal; | ||
} |
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. 여기 이 파일에 json을 이용해서 betting-set 컴포넌트을 활용한 코드가 있습니다. 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. feat/#12 에서 개발하실때 app.jsx에서 실제로 적용시킨 다음에 개발해 주시고 거기서 실행된다는것을 보여주시면 됩니다. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import './BettingList.css'; | ||
import BettingSet from './../../../components/betting/set/BettingSet'; | ||
|
||
function BettingList({ eventList }){ | ||
let bettingEvents = Object.keys(eventList); // 배팅 종목들 ex) 농구, 축구, 이어달리기 | ||
|
||
let bettingList = Object.values(eventList).map((bettings, index) => { | ||
return ( | ||
<div key={index} className='event'> | ||
<h2>{bettingEvents[index]}</h2> | ||
{ | ||
Object.values(bettings).map((betting, index) => { | ||
return ( | ||
<BettingSet key={betting.id || index} betting={betting} /> | ||
); | ||
}) | ||
} | ||
</div> | ||
); | ||
}); | ||
|
||
return ( | ||
<div id='BettingList'> | ||
{bettingList} | ||
</div> | ||
); | ||
} | ||
|
||
export default BettingList; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#Banner { | ||
/* width: 92.5rem; | ||
height: 21.625rem; */ | ||
width: 65rem; | ||
height: 15rem; | ||
flex-shrink: 0; | ||
|
||
border-radius: 1.25rem; | ||
background: linear-gradient(90deg, #4D4FE2 0%, #1A8FEC 100%); | ||
} | ||
|
||
#Banner .bettingTitleText { | ||
color: #FFF; | ||
text-align: center; | ||
font-family: WAGURI; | ||
font-size: 2.625rem; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: normal; | ||
} | ||
|
||
#Banner .bettingTeamText { | ||
color: #FFF; | ||
text-align: center; | ||
font-family: WAGURI; | ||
font-size: 1.25rem; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: normal; | ||
} |
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로 데이터를 끌고 와서 보여줄 거로 저는 생각을 하고 개발을 하였는데 이 함수에서 데이터를 호출시키는 거 였나요?