File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ export const finishMovement = (t, pause = true) => {
190190 } ) ;
191191} ;
192192
193- export const resetTraining = state => {
193+ const resetTraining = state => {
194194 state . trainer . clearAll ( ) ;
195195 setState ( {
196196 yesCount : 0 ,
@@ -222,3 +222,7 @@ export const reportPageView = page => {
222222 window . ga ( 'set' , 'page' , syntheticPagePath ) ;
223223 window . ga ( 'send' , 'pageview' ) ;
224224} ;
225+
226+ export default {
227+ resetTraining
228+ } ;
Original file line number Diff line number Diff line change @@ -5,11 +5,10 @@ import _ from 'lodash';
55import { getState , setState } from './state' ;
66import constants , { AppMode , Modes } from './constants' ;
77import modeHelpers from './modeHelpers' ;
8- import {
8+ import helpers , {
99 $time ,
1010 currentRunTime ,
1111 finishMovement ,
12- resetTraining ,
1312 friendlyNameForFishPart
1413} from './helpers' ;
1514import train from './models/train' ;
@@ -887,7 +886,7 @@ let UnwrappedTrain = class Train extends React.Component {
887886 const noButtonText =
888887 state . appMode === AppMode . CreaturesVTrash ? 'No' : `Not ${ state . word } ` ;
889888 const resetTrainingFunction = ( ) => {
890- resetTraining ( state ) ;
889+ helpers . resetTraining ( state ) ;
891890 setState ( { showConfirmationDialog : false } ) ;
892891 } ;
893892
@@ -1438,7 +1437,7 @@ let UnwrappedPond = class Pond extends React.Component {
14381437 style = { styles . playAgainButton }
14391438 onClick = { ( ) => {
14401439 setState ( { pondClickedFish : null , pondPanelShowing : false } ) ;
1441- resetTraining ( state ) ;
1440+ helpers . resetTraining ( state ) ;
14421441 modeHelpers . toMode ( Modes . Words ) ;
14431442 } }
14441443 >
You can’t perform that action at this time.
0 commit comments