From 68380c892566a025cf5fb2969dbbe1d42e90563e Mon Sep 17 00:00:00 2001 From: Magic Cat Date: Thu, 6 May 2021 15:45:21 +0800 Subject: [PATCH 1/5] Updated ListContainer.js --- imports/ui/transactions/ListContainer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imports/ui/transactions/ListContainer.js b/imports/ui/transactions/ListContainer.js index 898714ed4..43a62a6f5 100644 --- a/imports/ui/transactions/ListContainer.js +++ b/imports/ui/transactions/ListContainer.js @@ -9,7 +9,7 @@ export default ValidatorDetailsContainer = withTracker((props) => { if (Meteor.isClient){ transactionsHandle = Meteor.subscribe('transactions.list', props.limit); - loading = !transactionsHandle.ready(); + loading = !transactionsHandle.ready() && props.limit == Meteor.settings.public.initialPageSize; if (!loading) { transactions = Transactions.find({}, {sort:{height:-1}}).fetch(); From 13ec66f3b9e8f8d50b9e5ff10c8ffdd6e7f06f5a Mon Sep 17 00:00:00 2001 From: Magic Cat Date: Thu, 6 May 2021 15:51:12 +0800 Subject: [PATCH 2/5] Added CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index df9e4bbbd..15a9e0fb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## [UNRELEASED] * [#524] Added `noreferrer` to Banner links +* [#447] Fixed txs scrolling issue that was causing page to reload and jump to the top when user scrolled to the bottom of the page. ## v0.41.x-14 * [#488] Updated missing proposer address in proposals. From 78e3b6f2b92863b7fd2ff77ec4dd5edeb3741c78 Mon Sep 17 00:00:00 2001 From: Magic Cat Date: Tue, 18 May 2021 22:55:42 +0800 Subject: [PATCH 3/5] Wrap list in container --- imports/ui/transactions/TransactionsList.jsx | 69 ++++++++++---------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/imports/ui/transactions/TransactionsList.jsx b/imports/ui/transactions/TransactionsList.jsx index 4a9544796..95185114f 100644 --- a/imports/ui/transactions/TransactionsList.jsx +++ b/imports/ui/transactions/TransactionsList.jsx @@ -83,7 +83,7 @@ export default class Transactions extends Component{ } render(){ - return !this.props.homepage ?
+ return !this.props.homepage ?
Latest Transactions on {Meteor.settings.public.chainName} | Big Dipper @@ -108,41 +108,44 @@ export default class Transactions extends Component{ > } /> - + + + -
: -
transactions.transactions
- - - - - - } - open={this.state.sidebarOpen} - onSetOpen={this.onSetSidebarOpen} - styles={{ - sidebar: { - background: "white", - position: "fixed", - width: '85%', - zIndex: 4 - }, overlay: { - zIndex: 3 - } - }} - > - } /> + + : +
transactions.transactions
+ +
+ + + + } + open={this.state.sidebarOpen} + onSetOpen={this.onSetSidebarOpen} + styles={{ + sidebar: { + background: "white", + position: "fixed", + width: '85%', + zIndex: 4 + }, overlay: { + zIndex: 3 + } + }} + > + } /> - - - - - + + + + + -
-
-
; + + + ; } } \ No newline at end of file From e396a9dbdfa84a02c49c749f462c0ffd46552fc3 Mon Sep 17 00:00:00 2001 From: Magic Cat Date: Thu, 27 May 2021 18:01:19 +0800 Subject: [PATCH 4/5] WIP: Add react-window pkg --- imports/ui/transactions/List.jsx | 69 +++++++++++++------- imports/ui/transactions/ListContainer.js | 3 +- imports/ui/transactions/TransactionsList.jsx | 60 +++++++++-------- package-lock.json | 40 +++++++++++- package.json | 1 + 5 files changed, 117 insertions(+), 56 deletions(-) diff --git a/imports/ui/transactions/List.jsx b/imports/ui/transactions/List.jsx index 18b2ecbf4..5f43f6cef 100644 --- a/imports/ui/transactions/List.jsx +++ b/imports/ui/transactions/List.jsx @@ -2,8 +2,11 @@ import React, { Component } from 'react'; import { Row, Col, Spinner } from 'reactstrap'; import { TransactionRow } from './TransactionRow.jsx'; import i18n from 'meteor/universe:i18n'; +import { VariableSizeList } from 'react-window'; +const PADDING_SIZE = 10; const T = i18n.createComponent(); + export default class Transactions extends Component{ constructor(props){ super(props); @@ -19,10 +22,10 @@ export default class Transactions extends Component{ if (this.props.transactions.length > 0){ this.setState({ txs: this.props.transactions.map((tx, i) => { - return }) }) @@ -30,24 +33,42 @@ export default class Transactions extends Component{ } } - render(){ - if (this.props.loading){ - return - } - else if (!this.props.transactionsExist){ - return
transactions.notFound
- } - else{ - return
- - message transactions.activities - transactions.txHash - common.height - check_circle transactions.valid - {!this.state.homepage ? monetization_on transactions.fee : null } - - {this.state.txs} -
- } - } + getItemSize = index => (117 * (this.state.txs[index]?.props?.tx?.tx?.body?.messages.length)) + + TxRow = ({ index, style }) => ( +
{this.state.txs[index]}
+ + ); + + render(){ + if (this.props.loading){ + return + } + else if (!this.props.transactionsExist){ + return
transactions.notFound
+ } + else{ + return
+ + message transactions.activities + transactions.txHash + common.height + check_circle transactions.valid + {!this.state.homepage ? monetization_on transactions.fee : null } + + {this.state.txs ? + + {this.TxRow} + : ''} +
+ } + } } \ No newline at end of file diff --git a/imports/ui/transactions/ListContainer.js b/imports/ui/transactions/ListContainer.js index 43a62a6f5..71c1f6340 100644 --- a/imports/ui/transactions/ListContainer.js +++ b/imports/ui/transactions/ListContainer.js @@ -8,7 +8,7 @@ export default ValidatorDetailsContainer = withTracker((props) => { let loading = true; if (Meteor.isClient){ - transactionsHandle = Meteor.subscribe('transactions.list', props.limit); + transactionsHandle = Meteor.subscribe('transactions.list', 2200); loading = !transactionsHandle.ready() && props.limit == Meteor.settings.public.initialPageSize; if (!loading) { @@ -26,5 +26,6 @@ export default ValidatorDetailsContainer = withTracker((props) => { loading, transactionsExist, transactions: transactionsExist ? transactions : {}, + transactionsCount: transactionsExist ? transactions.length : 0 }; })(List); \ No newline at end of file diff --git a/imports/ui/transactions/TransactionsList.jsx b/imports/ui/transactions/TransactionsList.jsx index 95185114f..a1ed0fbcd 100644 --- a/imports/ui/transactions/TransactionsList.jsx +++ b/imports/ui/transactions/TransactionsList.jsx @@ -12,12 +12,12 @@ import i18n from 'meteor/universe:i18n'; const T = i18n.createComponent(); -export default class Transactions extends Component{ - constructor(props){ +export default class Transactions extends Component { + constructor(props) { super(props); this.state = { - limit: props.homepage ? 16: Meteor.settings.public.initialPageSize, + limit: props.homepage ? 16 : Meteor.settings.public.initialPageSize, monikerDir: 1, votingPowerDir: -1, uptimeDir: -1, @@ -33,17 +33,17 @@ export default class Transactions extends Component{ isBottom(el) { return el.getBoundingClientRect().bottom <= window.innerHeight; } - + componentDidMount() { document.addEventListener('scroll', this.trackScrolling); } - + componentWillUnmount() { document.removeEventListener('scroll', this.trackScrolling); } - - componentDidUpdate(prevProps){ - if (this.props?.location?.pathname != prevProps?.location?.pathname){ + + componentDidUpdate(prevProps) { + if (this.props?.location?.pathname != prevProps?.location?.pathname) { this.setState({ sidebarOpen: (this.props?.location?.pathname.split("/transactions/").length == 2) }) @@ -55,15 +55,15 @@ export default class Transactions extends Component{ if (this.isBottom(wrappedElement)) { // console.log('header bottom reached'); document.removeEventListener('scroll', this.trackScrolling); - this.setState({loadmore:true}); + this.setState({ loadmore: true }); this.setState({ - limit: this.state.limit+10 + limit: this.state.limit + 10 }, (err, result) => { - if (!err){ + if (!err) { document.addEventListener('scroll', this.trackScrolling); } - if (result){ - this.setState({loadmore:false}); + if (result) { + this.setState({ loadmore: false }); } }) } @@ -71,19 +71,19 @@ export default class Transactions extends Component{ onSetSidebarOpen(open) { // console.log(open); - this.setState({ sidebarOpen: open }, (error, result) =>{ + this.setState({ sidebarOpen: open }, (error, result) => { let timer = Meteor.setTimeout(() => { - if (!open){ + if (!open) { this.props.history.push('/transactions'); } Meteor.clearTimeout(timer); - },500) + }, 500) }); - + } - render(){ - return !this.props.homepage ?
+ render() { + return !this.props.homepage ?
Latest Transactions on {Meteor.settings.public.chainName} | Big Dipper @@ -93,18 +93,20 @@ export default class Transactions extends Component{ - } open={this.state.sidebarOpen} onSetOpen={this.onSetSidebarOpen} - styles={{ sidebar: { - background: "white", - position: "fixed", - width: '85%', - zIndex: 4 - },overlay: { - zIndex: 3 - } }} + styles={{ + sidebar: { + background: "white", + position: "fixed", + width: '85%', + zIndex: 4 + }, overlay: { + zIndex: 3 + } + }} > } /> @@ -142,7 +144,7 @@ export default class Transactions extends Component{ - + diff --git a/package-lock.json b/package-lock.json index b71de92da..cfa3e4245 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4698,8 +4698,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "mute-stream": { "version": "0.0.7", @@ -5920,6 +5919,15 @@ "react-lifecycles-compat": "^3.0.4" } }, + "react-window": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/react-window/-/react-window-1.8.6.tgz", + "integrity": "sha512-8VwEEYyjz6DCnGBsd+MgkD0KJ2/OXFULyDtorIiTz+QzwoP94tBoA7CnbtyXMm+cCeAUER5KJcPtWl9cpKbOBg==", + "requires": { + "@babel/runtime": "^7.0.0", + "memoize-one": ">=3.1.1 <6" + } + }, "reactstrap": { "version": "8.9.0", "resolved": "https://registry.npmjs.org/reactstrap/-/reactstrap-8.9.0.tgz", @@ -6837,6 +6845,34 @@ "supercop.js": "^2.0.1", "varstruct": "^6.1.1", "websocket-stream": "^5.1.1" + }, + "dependencies": { + "axios": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "requires": { + "follow-redirects": "1.5.10" + } + }, + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "requires": { + "debug": "=3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + } + } + } } }, "text-table": { diff --git a/package.json b/package.json index 0077af2f0..6f9f235e6 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "react-showdown": "^1.6.0", "react-sidebar": "^3.0.2", "react-toastify": "^4.5.2", + "react-window": "^1.8.6", "reactstrap": "^8.9.0", "rollup": "^2.49.0", "secp256k1": "^3.8.0", From d46703d0e94512f78c45be90be3596d4ef4130af Mon Sep 17 00:00:00 2001 From: Magic Cat Date: Thu, 3 Jun 2021 16:52:49 +0800 Subject: [PATCH 5/5] WIP: Add VariableSizeList --- client/styles.scss | 4 + imports/ui/transactions/List.jsx | 110 +++++++++++-------- imports/ui/transactions/ListContainer.js | 12 +- imports/ui/transactions/Transaction.jsx | 45 ++++---- imports/ui/transactions/TransactionRow.jsx | 80 ++++++++------ imports/ui/transactions/TransactionsList.jsx | 78 ++++++------- 6 files changed, 176 insertions(+), 153 deletions(-) diff --git a/client/styles.scss b/client/styles.scss index 61106cde3..834cfb4ac 100644 --- a/client/styles.scss +++ b/client/styles.scss @@ -568,6 +568,10 @@ body { padding-bottom: 0.4rem; border-bottom: 1px solid $gray-300; } + &.tx-info-row{ + padding-top: 0.4rem; + padding-bottom: 0.4rem; + } } .tx-info.invalid { diff --git a/imports/ui/transactions/List.jsx b/imports/ui/transactions/List.jsx index 5f43f6cef..935e0dcb5 100644 --- a/imports/ui/transactions/List.jsx +++ b/imports/ui/transactions/List.jsx @@ -4,71 +4,89 @@ import { TransactionRow } from './TransactionRow.jsx'; import i18n from 'meteor/universe:i18n'; import { VariableSizeList } from 'react-window'; -const PADDING_SIZE = 10; -const T = i18n.createComponent(); -export default class Transactions extends Component{ - constructor(props){ +const T = i18n.createComponent(); +export default class Transactions extends Component { + constructor(props) { super(props); + this.childRef = React.createRef(); + this.state = { txs: "", - homepage: window?.location?.pathname === '/' ? true : false - + homepage: window?.location?.pathname === '/' ? true : false, } } - componentDidUpdate(prevProps){ - if (this.props != prevProps){ - if (this.props.transactions.length > 0){ + componentDidUpdate(prevProps, prevState) { + if (this.props != prevProps) { + if (this.props.transactions.length > 0) { this.setState({ txs: this.props.transactions.map((tx, i) => { return - }) - }) + }), + height: this.childRef.current?.myRef?.current?.clientHeight + }) } } } - getItemSize = index => (117 * (this.state.txs[index]?.props?.tx?.tx?.body?.messages.length)) + componentDidMount() { + this.childRef?.current?.myRef?.current?.clientHeight + } + - TxRow = ({ index, style }) => ( -
{this.state.txs[index]}
+ getItemSize = index => { + if (this.state.txs[index]?.props?.tx?.tx?.body?.messages.length > 1) { + if (this.state.txs[index]?.props?.tx?.tx?.body?.messages[0]['@type'] === '/cosmos.bank.v1beta1.MsgSend') { + return 100 * this.state.txs[index]?.props?.tx?.tx?.body?.messages.length + } + return 80 * this.state.txs[index]?.props?.tx?.tx?.body?.messages.length + } + else { + return 130 + } + } - ); + TxRow = ({ index, style }) => ( +
{this.state.txs[index]}
+ ); - render(){ - if (this.props.loading){ - return - } - else if (!this.props.transactionsExist){ - return
transactions.notFound
- } - else{ - return
- - message transactions.activities - transactions.txHash - common.height - check_circle transactions.valid - {!this.state.homepage ? monetization_on transactions.fee : null } - - {this.state.txs ? - - {this.TxRow} - : ''} -
- } - } + render() { + if (this.props.loading) { + return + } + else if (!this.props.transactionsExist) { + return
transactions.notFound
+ } + else { + return
+ + message transactions.activities + transactions.txHash + common.height + check_circle transactions.valid + {!this.state.homepage ? monetization_on transactions.fee : null} + + {this.state.txs ? + + {this.TxRow} + + : ''} +
+ } + } } \ No newline at end of file diff --git a/imports/ui/transactions/ListContainer.js b/imports/ui/transactions/ListContainer.js index 71c1f6340..e2b48e17e 100644 --- a/imports/ui/transactions/ListContainer.js +++ b/imports/ui/transactions/ListContainer.js @@ -7,21 +7,21 @@ export default ValidatorDetailsContainer = withTracker((props) => { let transactionsHandle, transactions, transactionsExist; let loading = true; - if (Meteor.isClient){ - transactionsHandle = Meteor.subscribe('transactions.list', 2200); + if (Meteor.isClient) { + transactionsHandle = Meteor.subscribe('transactions.list', props.limit); loading = !transactionsHandle.ready() && props.limit == Meteor.settings.public.initialPageSize; if (!loading) { - transactions = Transactions.find({}, {sort:{height:-1}}).fetch(); + transactions = Transactions.find({}, { sort: { height: -1 } }).fetch(); transactionsExist = !loading && !!transactions; } } - if (Meteor.isServer){ - transactions = Transactions.find({}, {sort:{height:-1}}).fetch(); + if (Meteor.isServer) { + transactions = Transactions.find({}, { sort: { height: -1 } }).fetch(); transactionsExist = !!transactions; } - + return { loading, transactionsExist, diff --git a/imports/ui/transactions/Transaction.jsx b/imports/ui/transactions/Transaction.jsx index d066ff286..9ed6ac7e3 100644 --- a/imports/ui/transactions/Transaction.jsx +++ b/imports/ui/transactions/Transaction.jsx @@ -12,32 +12,32 @@ import Coin from '/both/utils/coins.js'; import TimeStamp from '../components/TimeStamp.jsx'; const T = i18n.createComponent(); -export default class Transaction extends Component{ - constructor(props){ +export default class Transaction extends Component { + constructor(props) { super(props); - let showdown = require('showdown'); + let showdown = require('showdown'); showdown.setFlavor('github'); let denom = this.props.denom; } - render(){ - - - if (this.props.loading){ + render() { + + + if (this.props.loading) { return } - else{ - if (this.props.transactionExist){ + else { + if (this.props.transactionExist) { let tx = this.props.transaction; return Transaction {tx.txhash} on {Meteor.settings.public.chainName} | Big Dipper - + -

transactions.transaction {(!tx.code)?:}

- {(tx.code)? +

transactions.transaction {(!tx.code) ? : }

+ {(tx.code) ? - :''} +
: ''}
common.information
@@ -54,30 +54,29 @@ export default class Transaction extends Component{ {tx.txhash} common.height - {numbro(tx.height).format("0,0")} - {tx.block()? :null} + {numbro(tx.height).format("0,0")} + {tx.block() ? : null} transactions.fee - {(tx.tx.auth_info.fee.amount.length > 0)?tx.tx.auth_info.fee.amount.map((fee,i) => { + {(tx.tx.auth_info.fee.amount.length > 0) ? tx.tx.auth_info.fee.amount.map((fee, i) => { return {(new Coin(parseFloat(fee.amount), fee.denom)).toString(6)} - }):transactions.noFee} + }) : transactions.noFee} transactions.gasUsedWanted {numbro(tx.tx_response.gas_used).format("0,0")} / {numbro(tx.tx_response.gas_wanted).format("0,0")} transactions.memo - - +
transactions.activities
- {(tx.tx.body.messages && tx.tx.body.messages.length >0)?tx.tx.body.messages.map((msg,i) => { - return - }):''} + {(tx.tx.body.messages && tx.tx.body.messages.length > 0) ? tx.tx.body.messages.map((msg, i) => { + return + }) : ''}
} - else{ + else { return
transactions.noTxFound
} } diff --git a/imports/ui/transactions/TransactionRow.jsx b/imports/ui/transactions/TransactionRow.jsx index e60ffa90f..9ea186643 100644 --- a/imports/ui/transactions/TransactionRow.jsx +++ b/imports/ui/transactions/TransactionRow.jsx @@ -11,41 +11,51 @@ import numbro from 'numbro'; import Coin from '/both/utils/coins.js' import SentryBoundary from '../components/SentryBoundary.jsx'; import { Markdown } from 'react-showdown'; +import { + useRef, + useEffect, + createRef, +} from 'react'; -let showdown = require('showdown'); +let showdown = require('showdown'); showdown.setFlavor('github'); -export const TransactionRow = (props) => { - let tx = props.tx; - let homepage = window?.location?.pathname === '/' ? true : false; - - return - {(tx?.tx?.body?.messages && tx?.tx?.body?.messages.length >0)?tx?.tx?.body?.messages.map((msg,i) => { - return - }):''} - {!homepage ? {tx.txhash} : - {tx.txhash}} - schedule {tx.block()?:''}{(tx?.tx?.body?.memo && tx?.tx?.body?.memo != "")? - message - - - - :""} - {(!props.blockList) ? {numbro(tx.height).format("0,0")}:''} - {(!tx.code)?:} - {!homepage ? monetization_on {(tx?.tx?.auth_info?.fee?.amount.length > 0)?tx?.tx?.auth_info?.fee?.amount.map((fee,i) => { - return {(new Coin(parseFloat(fee.amount), (fee)?fee.denom:null)).toString(6)} - }) : No fee} : monetization_on {(tx?.tx?.auth_info?.fee?.amount.length > 0) ? tx?.tx?.auth_info?.fee?.amount.map((fee, i) => { - return {(new Coin(parseFloat(fee.amount), (fee) ? fee.denom : null)).toString(6)} - }) : No fee} } - {(tx.code)? - - - - :''} - -} +export class TransactionRow extends React.Component { + constructor(props) { + super(props); + this.myRef = React.createRef(); + } + render() { + let tx = this.props.tx; + let homepage = window?.location?.pathname === '/' ? true : false; + return
+ {(tx?.tx?.body?.messages && tx?.tx?.body?.messages.length > 0) ? tx?.tx?.body?.messages.map((msg, i) => { + return + }) : ''} + {!homepage ? {tx.txhash} : + {tx.txhash}} + schedule {tx.block() ? : ''}{(tx?.tx?.body?.memo && tx?.tx?.body?.memo != "") ? + message + + + + : ""} + {(!this.props.blockList) ? {numbro(tx.height).format("0,0")} : ''} + {(!tx.code) ? : } + {!homepage ? monetization_on {(tx?.tx?.auth_info?.fee?.amount.length > 0) ? tx?.tx?.auth_info?.fee?.amount.map((fee, i) => { + return {(new Coin(parseFloat(fee.amount), (fee) ? fee.denom : null)).toString(6)} + }) : No fee} : monetization_on {(tx?.tx?.auth_info?.fee?.amount.length > 0) ? tx?.tx?.auth_info?.fee?.amount.map((fee, i) => { + return {(new Coin(parseFloat(fee.amount), (fee) ? fee.denom : null)).toString(6)} + }) : No fee}} + {(tx.code) ? + + + + : ''} +
+ } +} \ No newline at end of file diff --git a/imports/ui/transactions/TransactionsList.jsx b/imports/ui/transactions/TransactionsList.jsx index a1ed0fbcd..54bd62af4 100644 --- a/imports/ui/transactions/TransactionsList.jsx +++ b/imports/ui/transactions/TransactionsList.jsx @@ -12,7 +12,7 @@ import i18n from 'meteor/universe:i18n'; const T = i18n.createComponent(); -export default class Transactions extends Component { +export default class TransactionsList extends Component { constructor(props) { super(props); @@ -24,7 +24,7 @@ export default class Transactions extends Component { proposerDir: -1, priority: 2, loadmore: false, - sidebarOpen: (props?.location?.pathname.split("/transactions/").length == 2) + sidebarOpen: (props?.location?.pathname.split("/transactions/").length == 2), } this.onSetSidebarOpen = this.onSetSidebarOpen.bind(this); @@ -53,11 +53,10 @@ export default class Transactions extends Component { trackScrolling = () => { const wrappedElement = document.getElementById('transactions'); if (this.isBottom(wrappedElement)) { - // console.log('header bottom reached'); document.removeEventListener('scroll', this.trackScrolling); this.setState({ loadmore: true }); this.setState({ - limit: this.state.limit + 10 + limit: this.state.limit + 3000 }, (err, result) => { if (!err) { document.addEventListener('scroll', this.trackScrolling); @@ -70,7 +69,6 @@ export default class Transactions extends Component { }; onSetSidebarOpen(open) { - // console.log(open); this.setState({ sidebarOpen: open }, (error, result) => { let timer = Meteor.setTimeout(() => { if (!open) { @@ -110,44 +108,38 @@ export default class Transactions extends Component { > } /> - - - - -
- : -
transactions.transactions
- - - - - - } - open={this.state.sidebarOpen} - onSetOpen={this.onSetSidebarOpen} - styles={{ - sidebar: { - background: "white", - position: "fixed", - width: '85%', - zIndex: 4 - }, overlay: { - zIndex: 3 - } - }} - > - } /> + + : +
transactions.transactions
+ +
+ + + + } + open={this.state.sidebarOpen} + onSetOpen={this.onSetSidebarOpen} + styles={{ + sidebar: { + background: "white", + position: "fixed", + width: '85%', + zIndex: 4 + }, overlay: { + zIndex: 3 + } + }} + > + } /> - - - - - - - -
-
-
; + + + + + + + + ; } } \ No newline at end of file