From 02cdc6542105395fa8fafe7a2eb60d9151d3e5e7 Mon Sep 17 00:00:00 2001 From: Jack Mallers Date: Wed, 7 Feb 2018 14:30:26 -0600 Subject: [PATCH] fix(old code): remove more old code from v1 --- app/components/Nav/Nav.js | 61 ------- app/components/Nav/Nav.scss | 188 ---------------------- app/components/Nav/index.js | 3 - app/routes/app/components/App.js | 11 +- app/routes/app/containers/AppContainer.js | 11 +- 5 files changed, 17 insertions(+), 257 deletions(-) delete mode 100644 app/components/Nav/Nav.js delete mode 100644 app/components/Nav/Nav.scss delete mode 100644 app/components/Nav/index.js diff --git a/app/components/Nav/Nav.js b/app/components/Nav/Nav.js deleted file mode 100644 index 38584bfd..00000000 --- a/app/components/Nav/Nav.js +++ /dev/null @@ -1,61 +0,0 @@ -import React from 'react' -import PropTypes from 'prop-types' -import { NavLink } from 'react-router-dom' -import Isvg from 'react-inlinesvg' - -import walletIcon from 'icons/wallet_2.svg' -import peersIcon from 'icons/contacts.svg' -import networkIcon from 'icons/network.svg' -import helpIcon from 'icons/help_2.svg' - -import styles from './Nav.scss' - -const Nav = ({ openPayForm, openRequestForm }) => ( - -) - -Nav.propTypes = { - openPayForm: PropTypes.func.isRequired, - openRequestForm: PropTypes.func.isRequired -} - -export default Nav diff --git a/app/components/Nav/Nav.scss b/app/components/Nav/Nav.scss deleted file mode 100644 index 88fa5ef5..00000000 --- a/app/components/Nav/Nav.scss +++ /dev/null @@ -1,188 +0,0 @@ -@import '../../variables.scss'; - -.nav { - display: inline-block; - vertical-align: top; - width: 15%; - font-size: 24px; - background: $secondary; - height: 100vh; - position: relative; - min-width: 15%; - color: $white; -} - -.header { - padding: 20px; - - h1 { - color: $main; - font-size: 30px; - font-weight: 300; - text-align: center; - float: left; - -webkit-font-smoothing: antialiased; - margin-right: 5px; - } - - span { - font-family: "Open Sans", "Helvetica Neue", Helvetica; - color: #bbb; - font-size: 11px; - letter-spacing: 2px; - text-transform: uppercase; - text-align: right; - line-height: 100%; - display: inline-block; - vertical-align: middle; - } -} - -.info { - padding: 25px 10px 10px 10px; - - .link { - display: inline-block; - vertical-align: top; - list-style-type: none; - width: 50%; - cursor: pointer; - } -} - - -.currency { - margin: 0 1px; - - &.active { - color: $main; - } - - span { - display: inline-block; - vertical-align: middle; - - svg[data-icon='ltc'] { - width: 24px; - height: 28px; - - g { - transform: scale(1.75) translate(-5px, -5px); - } - } - } -} - -.logo { - text-align: center; - margin-top: 20px; - margin-bottom: 35%; - - svg { - width: 100px; - height: 100px; - } -} - -.balance { - text-align: right; - color: $main; - - p { - margin: 2px 0; - - &:first-child { - font-size: 14px; - } - - &:nth-child(2) { - font-size: 12px; - } - - span { - display: inline-block; - vertical-align: top; - - svg[data-icon='ltc'] { - width: 10px; - height: 10px; - - g { - transform: scale(1.75) translate(-5px, -5px); - } - } - } - } -} - -.links { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - margin-top: 50%; - - .link { - position: relative; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - width: 100%; - color: $darkestgrey; - opacity: 0.5; - cursor: pointer; - text-decoration: none; - transition: all 0.25s; - - li { - margin: 12.5px 0; - min-width: 150px; - } - - &.active { - color: $main; - opacity: 1.0; - - svg g { - stroke: $main; - } - } - - svg { - width: 28px; - height: 28px; - vertical-align: middle; - } - - span { - margin-left: 15px; - line-height: 22px; - font-size: 18px; - font-weight: 500; - letter-spacing: .2px; - } - } -} - -.buttons { - width: 75%; - font-size: 18px; - position: absolute; - bottom: 10px; - right: 12.5%; - - .button { - margin-bottom: 20px; - font-weight: bold; - cursor: pointer; - text-transform: uppercase; - letter-spacing: .2px; - font-size: 0.75em; - } -} - - -.content { - width: 80%; -} diff --git a/app/components/Nav/index.js b/app/components/Nav/index.js deleted file mode 100644 index 768d2c60..00000000 --- a/app/components/Nav/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import Nav from './Nav' - -export default Nav diff --git a/app/routes/app/components/App.js b/app/routes/app/components/App.js index f81199c3..ba8190d8 100644 --- a/app/routes/app/components/App.js +++ b/app/routes/app/components/App.js @@ -1,23 +1,33 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' + import GlobalError from 'components/GlobalError' import LoadingBolt from 'components/LoadingBolt' + import Form from 'components/Form' import ModalRoot from 'components/ModalRoot' + import Network from 'components/Contacts/Network' import ContactModal from 'components/Contacts/ContactModal' import ContactsForm from 'components/Contacts/ContactsForm' + import styles from './App.scss' class App extends Component { componentWillMount() { const { fetchTicker, fetchInfo, newAddress, fetchChannels, fetchBalance, fetchDescribeNetwork } = this.props + // fetch price ticker fetchTicker() + // fetch node info fetchInfo() + // fetch new address for wallet newAddress('np2wkh') + // fetch nodes channels fetchChannels() + // fetch nodes balance fetchBalance() + // fetch LN network from nides POV fetchDescribeNetwork() } @@ -90,7 +100,6 @@ App.propTypes = { currentTicker: PropTypes.object, - children: PropTypes.object.isRequired } diff --git a/app/routes/app/containers/AppContainer.js b/app/routes/app/containers/AppContainer.js index 210feac9..2d9f0efa 100644 --- a/app/routes/app/containers/AppContainer.js +++ b/app/routes/app/containers/AppContainer.js @@ -1,6 +1,8 @@ import { withRouter } from 'react-router' import { connect } from 'react-redux' + import { fetchTicker, setCurrency, tickerSelectors } from 'reducers/ticker' + import { newAddress } from 'reducers/address' import { fetchInfo } from 'reducers/info' @@ -8,11 +10,15 @@ import { fetchInfo } from 'reducers/info' import { showModal, hideModal } from 'reducers/modal' import { setFormType } from 'reducers/form' + import { setPayAmount, setPayInput, updatePayErrors, payFormSelectors } from 'reducers/payform' + import { setRequestAmount, setRequestMemo } from 'reducers/requestform' import { sendCoins } from 'reducers/transaction' + import { payInvoice } from 'reducers/payment' + import { createInvoice, fetchInvoice } from 'reducers/invoice' import { fetchBlockHeight, lndSelectors } from 'reducers/lnd' @@ -23,12 +29,9 @@ import { closeChannel, channelsSelectors, currentChannels, - toggleFilterPulldown, changeFilter, - updateChannelSearchQuery, - openContactModal, closeContactModal } from 'reducers/channels' @@ -49,12 +52,12 @@ import { fetchDescribeNetwork } from 'reducers/network' import { clearError } from 'reducers/error' - import App from '../components/App' const mapDispatchToProps = { fetchTicker, setCurrency, + newAddress, fetchInfo,