From 59c0b2ee77bc7b60263de98988c7cbb7292cf92d Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Wed, 16 Oct 2019 19:45:47 -0400 Subject: [PATCH] compressing graphics --- admin/js/components/Option.js | 45 ----------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 admin/js/components/Option.js diff --git a/admin/js/components/Option.js b/admin/js/components/Option.js deleted file mode 100644 index c417212..0000000 --- a/admin/js/components/Option.js +++ /dev/null @@ -1,45 +0,0 @@ -import React, { useEffect, useState, useRef} from 'react'; -import {connect } from 'react-redux'; -import { toggleDrawerState } from '../store/actionCreators/system'; - -const Option = (props) => { - const mounted = useEffect; - const updated = useEffect; - const firstRender = useRef(true) - const [gameState,updateGameState] = useState({ - firstRender : true, - - }) - mounted(() => { - updateGameState({ - ...gameState, - tutorialVisible: true - }) - firstRender.current = false; - return function cleanup(){ - // clean up logic - } - },[]) - - updated(() =>{ - if(!firstRender.current){ - console.log("update only") - } - return function cleanup(){ - - } - }) - - // this.props.updateGameData({scrap: 1000, robots: 5}).then(console.log(this.props.gameDataReducer)); - - return ( -
- option -
- ); - -} - -const mapDispatchToProps = { toggleDrawerState } -const mapStateToProps = state => state -export default connect(mapStateToProps, mapDispatchToProps)(Option); \ No newline at end of file -- 2.17.1