Commit b298e335 authored by BsmhDev's avatar BsmhDev

fixind warrnings

parent 55a49263
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
@import "{}/imports/ui/stylesheets/loading.less"; @import "{}/imports/ui/stylesheets/loading.less";
@import "{}/imports/ui/stylesheets/history.less"; @import "{}/imports/ui/stylesheets/history.less";
@import "{}/imports/ui/stylesheets/snackbar.less"; @import "{}/imports/ui/stylesheets/snackbar.less";
@import "{}/imports/ui/stylesheets/game-close.less";
// @import "{}/imports/ui/stylesheets/answer-count-font.ttf"; // @import "{}/imports/ui/stylesheets/answer-count-font.ttf";
......
// import { describe, it } from 'mocha';
// import { expect } from 'chai';
// const foo = 'foo';
// describe('foo', function () {
// it('must be String', function() {
// expect(foo).to.be.a('string');
// });
// });
import React from 'react'; import React from 'react';
import { FlowRouter } from 'meteor/kadira:flow-router';
import Leaders from '../game-shared/leaders.js'; import Leaders from '../game-shared/leaders.js';
import Question from '../game-shared/question.js'; import Question from '../game-shared/question.js';
import QuestionStatistics from '../game-shared/question-statistics'; import QuestionStatistics from '../game-shared/question-statistics';
import Winner from '../game-shared/winner'; import Winner from '../game-shared/winner';
import GameLobby from './game-lobby'; import GameLobby from './game-lobby';
import GameClose from '../game-shared/game-close';
export default ({ game }) => { export default ({ game }) => {
const mapEventToPages = { const mapEventToPages = {
...@@ -15,7 +15,7 @@ export default ({ game }) => { ...@@ -15,7 +15,7 @@ export default ({ game }) => {
QuestionEnd: () => <QuestionStatistics game={game} />, QuestionEnd: () => <QuestionStatistics game={game} />,
ShowLeaders: () => <Leaders game={game} />, ShowLeaders: () => <Leaders game={game} />,
GameEnd: () => <Winner game={game} />, GameEnd: () => <Winner game={game} />,
GameClose: () => FlowRouter.go('Game.Home'), GameClose: () => <GameClose />,
}; };
const event = game.getLastEvent().nameType; const event = game.getLastEvent().nameType;
const gameRouter = mapEventToPages[event]; const gameRouter = mapEventToPages[event];
......
import React from 'react'; import React from 'react';
import { FlowRouter } from 'meteor/kadira:flow-router';
import Leaders from '../game-shared/leaders.js'; import Leaders from '../game-shared/leaders.js';
import Question from '../game-shared/question.js'; import Question from '../game-shared/question.js';
import QuestionStatistics from '../game-shared/question-statistics'; import QuestionStatistics from '../game-shared/question-statistics';
import Winner from '../game-shared/winner'; import Winner from '../game-shared/winner';
import Instructions from './instructions.js'; import Instructions from './instructions.js';
import AnswerSent from './answer-sent.js'; import AnswerSent from './answer-sent.js';
import GameClose from '../game-shared/game-close';
export default ({ game }) => { export default ({ game }) => {
const mapEventToPages = { const mapEventToPages = {
...@@ -16,7 +16,7 @@ export default ({ game }) => { ...@@ -16,7 +16,7 @@ export default ({ game }) => {
QuestionEnd: () => <QuestionStatistics game={game} />, QuestionEnd: () => <QuestionStatistics game={game} />,
ShowLeaders: () => <Leaders game={game} />, ShowLeaders: () => <Leaders game={game} />,
GameEnd: () => <Winner game={game} />, GameEnd: () => <Winner game={game} />,
GameClose: () => FlowRouter.go('Game.Home'), GameClose: () => <GameClose />,
}; };
const event = game.getGamePage(); const event = game.getGamePage();
const gameRouter = mapEventToPages[event]; const gameRouter = mapEventToPages[event];
......
import React from 'react';
import { FlowRouter } from 'meteor/kadira:flow-router';
const GameClose = () => {
const backToHome = () => {
FlowRouter.go('Game.Home');
};
return (
<div id="game-close">
<div className="game-background" />
<div>
<a href="javascript:void(0)" className="btn btn-primary show-leaders-btn" onClick={backToHome}>
לטבלת המובילים
</a>
</div>
<div className="row">
<div id="title">
<h1>המשחק הסתיים</h1>
</div>
</div>
</div>
);
};
export default GameClose;
#game-close {
padding-top: 80px;
#title {
text-align: center;
padding-top: 100px;
}
}
\ No newline at end of file
...@@ -106,5 +106,6 @@ ...@@ -106,5 +106,6 @@
} }
.show-leaders-btn { .show-leaders-btn {
position: fixed; position: fixed;
z-index: 1;
} }
} }
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
"chart.js": "^2.6.0", "chart.js": "^2.6.0",
"mdbootstrap": "^4.3.2", "mdbootstrap": "^4.3.2",
"meteor-node-stubs": "^0.2.11", "meteor-node-stubs": "^0.2.11",
"mocha": "^3.4.2",
"react": "^15.6.1", "react": "^15.6.1",
"react-addons-pure-render-mixin": "^15.5.2", "react-addons-pure-render-mixin": "^15.5.2",
"react-chartjs": "^0.8.0", "react-chartjs": "^0.8.0",
...@@ -30,7 +31,8 @@ ...@@ -30,7 +31,8 @@
"eslint-plugin-import": "^2.2.0", "eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^4.0.0", "eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-meteor": "^4.0.1", "eslint-plugin-meteor": "^4.0.1",
"eslint-plugin-react": "^6.10.3" "eslint-plugin-react": "^6.10.3",
"mocha": "^3.4.2"
}, },
"eslintConfig": { "eslintConfig": {
"extends": "@meteorjs/eslint-config-meteor" "extends": "@meteorjs/eslint-config-meteor"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment