File tree Expand file tree Collapse file tree
__tests__/app/containers/__snapshots__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,70 +29,58 @@ exports[`SideBar Container Should render 1`] = `
2929 <div
3030 className = " w-100 justify-content-center align-items-center btn-group-vertical"
3131 >
32- <Button
33- active = { false }
34- block = { false }
35- bsClass = " btn"
36- bsStyle = " default"
32+ <a
3733 className = " py-2 px-auto text-white d-flex justify-content-center"
38- disabled = { false }
39- onClick = { [Function ]}
34+ href = " /#/home"
4035 >
41- <button
42- className = " py-2 px-auto text-white d-flex justify-content-center btn btn-default"
43- disabled = { false }
44- onClick = { [Function ]}
45- type = " button"
46- >
47- <FontAwesomeIcon
48- border = { false }
49- className = " "
50- fixedWidth = { false }
51- flip = { null }
52- icon = {
53- Object {
54- " icon" : Array [
55- 640 ,
56- 512 ,
57- Array [],
58- " f121" ,
59- " M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z" ,
60- ],
61- " iconName" : " code" ,
62- " prefix" : " fas" ,
63- }
36+ <FontAwesomeIcon
37+ border = { false }
38+ className = " "
39+ fixedWidth = { false }
40+ flip = { null }
41+ icon = {
42+ Object {
43+ " icon" : Array [
44+ 576 ,
45+ 512 ,
46+ Array [],
47+ " f015" ,
48+ " M488 312.7V456c0 13.3-10.7 24-24 24H348c-6.6 0-12-5.4-12-12V356c0-6.6-5.4-12-12-12h-72c-6.6 0-12 5.4-12 12v112c0 6.6-5.4 12-12 12H112c-13.3 0-24-10.7-24-24V312.7c0-3.6 1.6-7 4.4-9.3l188-154.8c4.4-3.6 10.8-3.6 15.3 0l188 154.8c2.7 2.3 4.3 5.7 4.3 9.3zm83.6-60.9L488 182.9V44.4c0-6.6-5.4-12-12-12h-56c-6.6 0-12 5.4-12 12V117l-89.5-73.7c-17.7-14.6-43.3-14.6-61 0L4.4 251.8c-5.1 4.2-5.8 11.8-1.6 16.9l25.5 31c4.2 5.1 11.8 5.8 16.9 1.6l235.2-193.7c4.4-3.6 10.8-3.6 15.3 0l235.2 193.7c5.1 4.2 12.7 3.5 16.9-1.6l25.5-31c4.2-5.2 3.4-12.7-1.7-16.9z" ,
49+ ],
50+ " iconName" : " home" ,
51+ " prefix" : " fas" ,
6452 }
65- inverse = { false }
66- listItem = { false }
67- mask = { null }
68- pull = { null }
69- pulse = { false }
70- rotation = { null }
71- size = { null }
72- spin = { false }
73- symbol = { false }
74- title = " "
75- transform = { null }
53+ }
54+ inverse = { false }
55+ listItem = { false }
56+ mask = { null }
57+ pull = { null }
58+ pulse = { false }
59+ rotation = { null }
60+ size = { null }
61+ spin = { false }
62+ symbol = { false }
63+ title = " "
64+ transform = { null }
65+ >
66+ <svg
67+ aria-hidden = " true"
68+ className = " svg-inline--fa fa-home fa-w-18 "
69+ data-icon = " home"
70+ data-prefix = " fas"
71+ role = " img"
72+ style = { Object {}}
73+ viewBox = " 0 0 576 512"
74+ xmlns = " http://www.w3.org/2000/svg"
7675 >
77- <svg
78- aria-hidden = " true"
79- className = " svg-inline--fa fa-code fa-w-20 "
80- data-icon = " code"
81- data-prefix = " fas"
82- role = " img"
76+ <path
77+ d = " M488 312.7V456c0 13.3-10.7 24-24 24H348c-6.6 0-12-5.4-12-12V356c0-6.6-5.4-12-12-12h-72c-6.6 0-12 5.4-12 12v112c0 6.6-5.4 12-12 12H112c-13.3 0-24-10.7-24-24V312.7c0-3.6 1.6-7 4.4-9.3l188-154.8c4.4-3.6 10.8-3.6 15.3 0l188 154.8c2.7 2.3 4.3 5.7 4.3 9.3zm83.6-60.9L488 182.9V44.4c0-6.6-5.4-12-12-12h-56c-6.6 0-12 5.4-12 12V117l-89.5-73.7c-17.7-14.6-43.3-14.6-61 0L4.4 251.8c-5.1 4.2-5.8 11.8-1.6 16.9l25.5 31c4.2 5.1 11.8 5.8 16.9 1.6l235.2-193.7c4.4-3.6 10.8-3.6 15.3 0l235.2 193.7c5.1 4.2 12.7 3.5 16.9-1.6l25.5-31c4.2-5.2 3.4-12.7-1.7-16.9z"
78+ fill = " currentColor"
8379 style = { Object {}}
84- viewBox = " 0 0 640 512"
85- xmlns = " http://www.w3.org/2000/svg"
86- >
87- <path
88- d = " M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"
89- fill = " currentColor"
90- style = { Object {}}
91- />
92- </svg >
93- </FontAwesomeIcon >
94- </button >
95- </Button >
80+ />
81+ </svg >
82+ </FontAwesomeIcon >
83+ </a >
9684 <Button
9785 active = { false }
9886 block = { false }
Original file line number Diff line number Diff line change @@ -84,19 +84,11 @@ export class Leaderboard extends React.Component<
8484 isLoggedIn,
8585 } = this . props ;
8686 return (
87- < Grid fluid = { true } className = { classnames ( styles . Leaderboard ) } >
88- { isLoggedIn ? < SocketHandler /> : null }
89- < Row className = { classnames ( 'py-2 pl-3' , styles . leaderboardTitle ) } >
90- < Col
91- sm = { 9 }
92- className = "text-light font-weight-bold my-auto"
93- style = { { left : '45%' , height : '10%' , paddingTop : '10px' , paddingBottom : '10px' } }
94- >
95- LEADERBOARD
96- </ Col >
97- </ Row >
98- { this . state . isSearching ? (
99- < Row className = { classnames ( 'py-2 pl-3' , styles . leaderboardTitle ) } >
87+ < >
88+ < NavBar isLoggedIn = { isLoggedIn } page = { NavPage . LEADERBOARD } />
89+ < Grid fluid = { true } className = { classnames ( styles . Leaderboard ) } >
90+ { isLoggedIn ? < SocketHandler /> : null }
91+ < Row className = { classnames ( 'py-4 pl-3' ) } >
10092 < Col
10193 sm = { 10 }
10294 className = "text-light font-weight-bold my-auto"
Original file line number Diff line number Diff line change @@ -37,15 +37,17 @@ export class Sidebar extends React.Component<SideBarInterfaces.Props, {}> {
3737 vertical
3838 className = { classnames ( 'w-100 justify-content-center align-items-center' , styles . Sidebar ) }
3939 >
40- < Button
40+ < a
41+ href = "/#/home"
4142 className = { classnames (
4243 'py-2 px-auto text-white d-flex justify-content-center' ,
4344 styles . customBtn ,
4445 ) }
4546 onClick = { ( ) => closeSidePanelTab ( ) }
4647 >
47- < FontAwesomeIcon icon = { faCode } />
48- </ Button >
48+ < FontAwesomeIcon icon = { faHome } />
49+ </ a >
50+
4951 < Button
5052 className = { classnames ( 'py-2 px-auto documentation-btn-ctrl' , styles . customBtn , {
5153 [ `${ styles . customBtnActive } ` ] : sidePanelTab === SidePanelTab . DOCS ,
Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ initializeRendererAssets();
1717
1818/* tslint:disable-next-line:variable-name */
1919export const App = hot ( module ) ( ( ) => (
20- < BrowserRouter >
20+ < HashRouter >
21+ < Sugar background = "#484848" color = "white" />
2122 < Switch >
2223 < Route exact path = { Routes . ROOT } component = { Dashboard } />
2324 < Route exact path = { Routes . LOGIN } component = { Login } />
@@ -26,6 +27,5 @@ export const App = hot(module)(() => (
2627 < Route exact path = { Routes . USER_PROFILE_MODEL } component = { UserProfileModal } />
2728 < Route path = { Routes . USER_ACTIVATION } component = { ActivateUser } />
2829 </ Switch >
29- < Sugar background = "#484848" color = "white" />
30- </ BrowserRouter >
30+ </ HashRouter >
3131) ) ;
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ export function* getMatches(action: ActionType<typeof MatchActions.getMatches>)
1818
1919 if ( isArray ( res ) ) {
2020 const matchData = mapMatchResponse ( res ) ;
21-
2221 yield put ( MatchActions . updateMatches ( matchData ) ) ;
2322 } else yield put ( NotificationActions . error ( res . message ) ) ;
2423 } catch ( err ) {
Original file line number Diff line number Diff line change @@ -60,15 +60,27 @@ export const mapMatchResponse = (
6060 } ) ;
6161} ;
6262
63+ export enum VERDICT {
64+ TIE = 'TIE' ,
65+ PLAYER1 = 'PLAYER1' ,
66+ PLAYER2 = 'PLAYER2' ,
67+ }
68+
69+ export enum MAP_VERDICT_TO_STRING {
70+ TIE = '0' ,
71+ PLAYER1 = '1' ,
72+ PLAYER2 = '2' ,
73+ }
74+
6375const getVerdict = ( verdict : string ) => {
6476 switch ( verdict ) {
65- case 'PLAYER_1' :
66- return '1' ;
67- case 'PLAYER_1' :
68- return '2' ;
69- case ' TIE' :
70- return '0' ;
77+ case VERDICT . PLAYER1 :
78+ return MAP_VERDICT_TO_STRING . PLAYER1 ;
79+ case VERDICT . PLAYER2 :
80+ return MAP_VERDICT_TO_STRING . PLAYER2 ;
81+ case VERDICT . TIE :
82+ return MAP_VERDICT_TO_STRING . TIE ;
7183 default :
72- return '0' ;
84+ return MAP_VERDICT_TO_STRING . TIE ;
7385 }
7486} ;
You can’t perform that action at this time.
0 commit comments