Skip to content

Commit 0a5c059

Browse files
author
Nick Litwin
committed
Fix syntax
1 parent 43c0f08 commit 0a5c059

17 files changed

+118
-107
lines changed

components/Prize/PrizeExamples.jsx

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
1-
'use strict'
2-
3-
require('./PrizeExamples.scss')
4-
51
import React from 'react'
62
import PrizeItems from './PrizeItems'
73

4+
require('./PrizeExamples.scss')
5+
86
const prizeItems = {
97
type : 'prize',
108
title : 'Prizes',
119
items : [
1210
{
1311
title : '1',
1412
subText : '$10,000'
15-
},{
13+
},
14+
{
1615
title : '2',
1716
subText : '$8,000'
18-
},{
17+
},
18+
{
1919
title : '3',
2020
subText : '$7,000'
21-
},{
21+
},
22+
{
2223
title : '4',
2324
subText : '$6,500'
24-
},{
25+
},
26+
{
2527
title : '5',
2628
subText : '$5,500'
27-
},{
29+
},
30+
{
2831
title : '6',
2932
subText : '$4,500'
3033
}
@@ -38,10 +41,12 @@ const bonusItems = {
3841
{
3942
title : 'Blitz',
4043
subText : '10% of prize'
41-
},{
44+
},
45+
{
4246
title : 'TCO points',
4347
subText : '18,000'
44-
},{
48+
},
49+
{
4550
title : 'Checkin',
4651
subText : '$50 x 5'
4752
}
@@ -55,4 +60,4 @@ const PrizeExamples = () => (
5560
</div>
5661
)
5762

58-
module.exports = PrizeExamples
63+
module.exports = PrizeExamples
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.divStyle {
2-
background-color:#47474F;
3-
padding:15px;
4-
width:400px;
5-
}
2+
background-color: #47474F;
3+
padding: 15px;
4+
width: 400px;
5+
}

components/Prize/PrizeItem.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
require('./PrizeItem.scss')
2-
31
import React from 'react'
42

5-
const PrizeItem = ({title,subText}) => {
3+
require('./PrizeItem.scss')
4+
5+
const PrizeItem = ({title, subText}) => {
66
return (
77
<div className="PrizeItem">
88
<div className="prize-circle">{title}</div> <span>{subText}</span>

components/Prize/PrizeItem.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $accent: #59A7FF;
1212
display:inline-block;
1313
height: 20px;
1414
margin-right: 15px;
15-
15+
1616
span {
1717
font-family: "Roboto", Arial, Helvetica, sans-serif;
1818
font-size: 13px;
@@ -34,7 +34,7 @@ $accent: #59A7FF;
3434
font-weight: bold;
3535
color: $gray;
3636
}
37-
37+
3838
}
3939

4040
.prize {
@@ -48,7 +48,7 @@ $accent: #59A7FF;
4848
background: $silver;
4949
}
5050
}
51-
51+
5252
.PrizeItem:nth-child(3) {
5353
.prize-circle{
5454
background: $bronze;
@@ -67,7 +67,7 @@ $accent: #59A7FF;
6767
background: $purple;
6868
}
6969
}
70-
70+
7171
.PrizeItem:nth-child(3) {
7272
.prize-circle {
7373
background: $accent;

components/Prize/PrizeItems.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
require('./PrizeItem.scss')
2-
31
import React from 'react'
42
import classNames from 'classnames'
53
import PrizeItem from './PrizeItem'
64

7-
const PrizeItems = ({type,title,items}) => {
5+
require('./PrizeItem.scss')
6+
7+
const PrizeItems = ({type, title, items}) => {
88
const itemsClass = classNames({
99
items : true,
1010
bonus : type === 'bonus',
@@ -14,7 +14,7 @@ const PrizeItems = ({type,title,items}) => {
1414
<div className="PrizeItems">
1515
<div className="title">{title}</div>
1616
<div className={itemsClass}>
17-
{items.map((item,index) => {
17+
{items.map((item, index) => {
1818
return <PrizeItem title={item.title} subText={item.subText} key={index}/>
1919
})}
2020
</div>
@@ -27,4 +27,4 @@ PrizeItem.propTypes = {
2727
items : React.PropTypes.array
2828
}
2929

30-
export default PrizeItems
30+
export default PrizeItems
Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,46 @@
1-
require('./ProgressBar.scss')
2-
31
import React from 'react'
42
import classNames from 'classnames'
53

6-
const ProgressBar = ({completionPercentage,checkPoints}) => {
4+
require('./ProgressBar.scss')
5+
6+
const ProgressBar = ({completionPercentage, checkPoints}) => {
77
function getCheckPointPositionStyle(percentage){
88
const style = {
99
left:percentage + '%'
1010
}
1111
return style
1212
}
13-
13+
1414
function getCheckPointPositionScaledStyle(percentage){
1515
percentage = Number.parseInt(percentage)*0.8
1616
const style = {
1717
left:percentage + '%'
1818
}
1919
return style
2020
}
21-
21+
2222
function getLengthScaledStyle(percentage){
2323
const style = {
2424
width:percentage + '%'
2525
}
2626
return style
2727
}
28-
28+
2929
function checkPointStyle(checkPointPercentage){
3030
checkPointPercentage = Number.parseInt(checkPointPercentage)
3131
completionPercentage = Number.parseInt(completionPercentage)
3232
const checkPointClass = classNames(
33-
'circle',{ completed : ( checkPointPercentage <= completionPercentage)}
33+
'circle',
34+
{ completed : ( checkPointPercentage <= completionPercentage)}
3435
)
3536
return checkPointClass
3637
}
37-
38+
3839
return (
3940
<div className="ProgressBar">
4041
<div className="progress-box">
4142
<div className="checkpoint-line">
42-
{checkPoints.map((checkPoint,index) => {
43+
{checkPoints.map((checkPoint, index) => {
4344
return <div className="checkpoint-text" style={getCheckPointPositionScaledStyle(checkPoint.completionPercentage)} key={index}>{checkPoint.name}</div>
4445
})}
4546
</div>
@@ -50,13 +51,13 @@ const ProgressBar = ({completionPercentage,checkPoints}) => {
5051
</div>
5152
<div className="progress-circles">
5253
<div className="circle"/>
53-
{checkPoints.map((checkPoint,index) => {
54+
{checkPoints.map((checkPoint, index) => {
5455
return <div className={checkPointStyle(checkPoint.completionPercentage)} style={getCheckPointPositionStyle(checkPoint.completionPercentage)} key={index}/>
5556
})}
5657
</div>
5758
</div>
5859
<div className="time-line">
59-
{checkPoints.map((checkPoint,index) => {
60+
{checkPoints.map((checkPoint, index) => {
6061
return <div className="time-line-text" style={getCheckPointPositionScaledStyle(checkPoint.completionPercentage)} key={index}>{checkPoint.timeline}</div>
6162
})}
6263
</div>
@@ -70,4 +71,4 @@ ProgressBar.propTypes = {
7071
checkPoints : React.PropTypes.array
7172
}
7273

73-
export default ProgressBar
74+
export default ProgressBar

components/ProgressBar/ProgressBar.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ $light-gray: #DCDCE0;
1010
position: absolute;
1111
width: 400px;
1212
margin: auto;
13-
13+
1414
.checkpoint-line {
1515
display: block;
1616
margin-bottom: 5px;
1717
height: 20px;
18-
18+
1919
.checkpoint-text {
2020
position: absolute;
2121
float: left;
@@ -30,7 +30,7 @@ $light-gray: #DCDCE0;
3030
width: 80%;
3131
position: relative;
3232
height: 8px;
33-
33+
3434
.progress-line {
3535
top:0px;
3636
position: absolute;
@@ -39,7 +39,7 @@ $light-gray: #DCDCE0;
3939
background-color: $light-gray;
4040
display: inline-block;
4141
}
42-
42+
4343
.completion-line {
4444
top:0px;
4545
left:0px;
@@ -70,21 +70,21 @@ $light-gray: #DCDCE0;
7070
}
7171
}
7272
}
73-
73+
7474
.time-line {
7575
display: block;
7676
margin-bottom: 5px;
7777
height: 20px;
7878
width: 100%;
79-
79+
8080
.time-line-text {
8181
position: absolute;
8282
float: left;
8383
font-family: "Roboto", Arial, Helvetica, sans-serif;
8484
font-size: 11px;
8585
line-height: 15px;
8686
color: $gray-30;
87-
}
87+
}
8888
}
8989
}
90-
}
90+
}

components/ProgressBar/ProgressBarExample.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
require('./ProgressBarExample.scss')
2-
31
import React from 'react'
42
import ProgressBar from './ProgressBar'
53

4+
require('./ProgressBarExample.scss')
5+
66
const progressBarData = {
77
completionPercentage : '56',
88
checkPoints : [
@@ -37,4 +37,4 @@ const ProgressBarExample = () => (
3737
</div>
3838
)
3939

40-
module.exports = ProgressBarExample
40+
module.exports = ProgressBarExample
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.divStyle {
22
background-color:#47474F;
3-
3+
44
width:420px;
55
height: 90px;
66
}

components/SubTrackDetails/SubTrackDetails.jsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
require('./SubTrackDetails.scss')
2-
31
import React from 'react'
42
import classNames from 'classnames'
53

6-
const SubTrackDetails = ({name,code,description,tracks}) => {
4+
require('./SubTrackDetails.scss')
5+
6+
const SubTrackDetails = ({name, code, description, tracks}) => {
77
const developClass = classNames(
8-
'verticalLine','develop',
8+
'verticalLine', 'develop',
99
{hidden: tracks.indexOf('develop') === -1 }
1010
)
1111
const designClass = classNames(
12-
'verticalLine','design',
12+
'verticalLine', 'design',
1313
{hidden: tracks.indexOf('design') === -1}
1414
)
1515
const dataScienceClass = classNames(
16-
'verticalLine','dataScience',
16+
'verticalLine', 'dataScience',
1717
{hidden: tracks.indexOf('data science') === -1}
1818
)
19-
19+
2020
return (
2121
<div className="SubTrackDetails">
2222
<div className="heading">
2323
<div className={developClass}></div>
24-
<div className={designClass}></div>
25-
<div className={dataScienceClass}></div>
24+
<div className={designClass}></div>
25+
<div className={dataScienceClass}></div>
2626
<div className="title">{name} ({code})</div>
2727
</div>
2828
<p className={description ? '' : 'hidden' }>{description}</p>

0 commit comments

Comments
 (0)