Skip to content

Commit

Permalink
refactor(game): animation is too violent, removing it
Browse files Browse the repository at this point in the history
  • Loading branch information
meriadec committed Oct 6, 2015
1 parent 8c9e143 commit 5a20f90
Showing 1 changed file with 20 additions and 24 deletions.
44 changes: 20 additions & 24 deletions components/pages/Game.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

// modules
import React from 'react';
import ReactTransitionGroup from 'react/lib/ReactTransitionGroup';
import connectToStores from 'fluxible-addons-react/connectToStores';

// stores
Expand All @@ -12,7 +11,6 @@ import GameStore from '../../stores/GameStore';
import SourceCode from '../SourceCode';
import SourceInput from '../SourceInput';
import GameStats from '../GameStats';
import { Slider } from '../ui';

// actions
import { beginTest, updateWord, typeWord, reset } from '../../actions/game';
Expand Down Expand Up @@ -79,28 +77,26 @@ class Game extends React.Component {
return (
<div className='Game'>

<ReactTransitionGroup>
{!isFinished && (
<Slider>

<SourceCode
context={this.props.context}
isFocused={this.props.isFocused}
text={text}
isFinished={isFinished}
currentWordIndex={currentWordIndex}
typedWord={typedWord} />

<SourceInput
isFocused={this.props.isFocused}
context={this.props.context}
typedWord={typedWord}
onChange={this.handleType.bind(this)}
onValidate={this.handleValidateWord.bind(this)} />

</Slider>
)}
</ReactTransitionGroup>
{!isFinished && (
<div>

<SourceCode
context={this.props.context}
isFocused={this.props.isFocused}
text={text}
isFinished={isFinished}
currentWordIndex={currentWordIndex}
typedWord={typedWord} />

<SourceInput
isFocused={this.props.isFocused}
context={this.props.context}
typedWord={typedWord}
onChange={this.handleType.bind(this)}
onValidate={this.handleValidateWord.bind(this)} />

</div>
)}

<GameStats
stats={stats} />
Expand Down

0 comments on commit 5a20f90

Please sign in to comment.