From 4b1b0dfedced3ab38186a4b4b43f4bebc06ffc9d Mon Sep 17 00:00:00 2001 From: devilla Date: Sun, 26 Jul 2020 23:38:23 +0530 Subject: [PATCH] passing data GettingStarted->App --- src/App.js | 20 +++++++++----------- src/components/GettingStarted.js | 5 +++-- src/components/Operators.js | 6 +----- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/src/App.js b/src/App.js index 6bc0ac7..49b45d9 100644 --- a/src/App.js +++ b/src/App.js @@ -1,12 +1,12 @@ import React from 'react'; -import SweetAlert from 'react-bootstrap-sweetalert'; -import { GraphQLClient } from 'graphql-request'; -import axios from 'axios'; -import createHmac from 'create-hmac'; -import uuidv4 from 'uuid/v4'; +// import SweetAlert from 'react-bootstrap-sweetalert'; +// import { GraphQLClient } from 'graphql-request'; +// import axios from 'axios'; +// import createHmac from 'create-hmac'; +// import uuidv4 from 'uuid/v4'; import "./content.css"; import './assets/css/argon.css'; -import qs from 'querystring'; +// import qs from 'querystring'; import Navbar from './components/Navbar.js'; import Settings from './components/Settings.js'; import GettingStarted from './components/GettingStarted.js' @@ -89,14 +89,12 @@ class App extends React.Component { } render() { - const { gettingStarted, settings, verification, operators, clientSeed, serverSeedHash, nonce, betData, cryptoGames, primeDice, stake, bitvest, diceResult, diceVerify, verify, apiKey, apiKeyStake, usernameStake, enterAPI, enterAPIStake, - Balance, BetId, Roll, nonceChecked, toggleState, betAmount, betPayout, betPlaced, isNonceManipulated, numberBetsVerFailed, betDataById, betDataEnriched, viewRecentBetsStake, showAlert, popupResult, active_game, mines, keno, numOfRows, - numOfColumns, numOfColumnsKeno } = this.state; + const { gettingStarted, operators } = this.state; return (
- - + + {operators && }
); diff --git a/src/components/GettingStarted.js b/src/components/GettingStarted.js index 720335d..ff43ecc 100644 --- a/src/components/GettingStarted.js +++ b/src/components/GettingStarted.js @@ -4,7 +4,8 @@ export default class GettingStarted extends React.Component { constructor(props) { super(props); this.state = { - gettingStarted: false + gettingStarted: false, + operators : true } } @@ -14,7 +15,7 @@ export default class GettingStarted extends React.Component { handleGettingStarted = () => { // this.getSessionTokenBitvest() - this.setState({ gettingStarted: false, operators: true }) + this.setState({ gettingStarted: false}) this.props.callback(this.state.operators); }; diff --git a/src/components/Operators.js b/src/components/Operators.js index e1a25eb..4557057 100644 --- a/src/components/Operators.js +++ b/src/components/Operators.js @@ -8,10 +8,6 @@ export default class Operators extends Component { operators: true } } - componentDidMount() { - this.setState({ operators: this.props.operators }) - console.log(this.props.operators); - } render() { const { operators, verification } = this.state; return ( @@ -30,7 +26,7 @@ export default class Operators extends Component {
{ this.setState({ operators: false, primeDice: false, stake: false, bitvest: true }) }}> - + Bitvest