From 435b598d41a56a070e4902c9bd8513e7344ced3f Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Sat, 8 Aug 2020 21:23:57 -0700 Subject: [PATCH] fix(configure): Adding tabs to Configure View --- .../admin-lte/configure/TabsMenu.js | 38 +++++++++++-------- src/components/admin-lte/configure/index.js | 31 +++++++-------- .../admin-lte/configure/menu-components.js | 14 ++++++- 3 files changed, 50 insertions(+), 33 deletions(-) diff --git a/src/components/admin-lte/configure/TabsMenu.js b/src/components/admin-lte/configure/TabsMenu.js index a24c9cb..12745ff 100644 --- a/src/components/admin-lte/configure/TabsMenu.js +++ b/src/components/admin-lte/configure/TabsMenu.js @@ -2,22 +2,28 @@ import React from 'react' import { Tabs, Tab } from 'react-bootstrap' import MenuComponents from './menu-components' +function TabsMenu (props) { + return ( + <> + {MenuComponents.length > 0 && ( + + -function TabsMenu(props) { - return ( - - {MenuComponents.length > 0 && - - - - {MenuComponents.map(menuItem => )} - } - - ) + {MenuComponents.map(menuItem => ( + + ))} + + )} + + ) } -export default TabsMenu; - +export default TabsMenu diff --git a/src/components/admin-lte/configure/index.js b/src/components/admin-lte/configure/index.js index d953841..d13a64b 100644 --- a/src/components/admin-lte/configure/index.js +++ b/src/components/admin-lte/configure/index.js @@ -3,17 +3,13 @@ import PropTypes from 'prop-types' import { Content, Row, Col, Box, Inputs, Button } from 'adminlte-2-react' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import MenuComponents from './menu-components' -// import BchWallet from 'minimal-slp-wallet' import Servers from './servers' import { setWalletInfo } from '../../localWallet' import TabsMenu from './TabsMenu' const { Text } = Inputs -const BchWallet = -typeof window !== 'undefined' - ? window.SlpWallet - : null +const BchWallet = typeof window !== 'undefined' ? window.SlpWallet : null let _this class Configure extends React.Component { @@ -31,7 +27,7 @@ class Configure extends React.Component { _this.BchWallet = BchWallet this.handleSelect = key => { - _this.setState({ menuItem: key }); + _this.setState({ menuItem: key }) } } @@ -39,7 +35,7 @@ class Configure extends React.Component { return ( - {_this.state.menuItem === 'Configure' && + {_this.state.menuItem === 'Configure' && ( <> @@ -61,21 +57,22 @@ class Configure extends React.Component { size='xs' icon='exclamation-triangle' /> - Be Careful + Be Careful

- Backup your wallet first. Updating the configuration will - restart the app. + Backup your wallet first. Updating the configuration + will restart the app.

- This is just a placeholder. This View will allow the user - to pick alternate back-end servers. The default will be{' '} + This is just a placeholder. This View will allow the + user to pick alternate back-end servers. The default + will be{' '} - FullStack.cash + FullStack.cash