From: Anthony Talarico Date: Wed, 16 Oct 2019 23:45:47 +0000 (-0400) Subject: compressing graphics X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=59c0b2ee77bc7b60263de98988c7cbb7292cf92d;p=WP-Themes%2FglmTheme.git compressing graphics --- 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