From 7a5f61029ac0ac70ba8034a226f62709a5d07b7c Mon Sep 17 00:00:00 2001 From: tsabit ghazwan Date: Tue, 29 Jan 2019 19:26:07 +0700 Subject: [PATCH] fix: make component centered --- src/common/pages/Wallet/index.js | 256 ++++++++++++++++--------------- 1 file changed, 130 insertions(+), 126 deletions(-) diff --git a/src/common/pages/Wallet/index.js b/src/common/pages/Wallet/index.js index d3c3b42..7c77e8c 100644 --- a/src/common/pages/Wallet/index.js +++ b/src/common/pages/Wallet/index.js @@ -158,145 +158,149 @@ export default class WalletComponent extends React.Component { }]; return ( -
-
-
-
-

Wallet

-
-
-
-
- - - -
-
- - - -
-
+
+
+
+
+
+
+

Wallet

+
+
+
+ + + +
+
+ + + +
-
- - - - - - - - - {(window.innerWidth < 600) ? -
- } - anchorOrigin={{horizontal: 'left', vertical: 'top'}} - targetOrigin={{horizontal: 'left', vertical: 'top'}} - > - this.globalUI.showDialog(DIALOG.WALLET.DEPOSIT)}/> - this.globalUI.showDialog(DIALOG.WALLET.WITHDRAW)}/> - -
- : +
+ + + + + + + + + {(window.innerWidth < 600) ? +
+ } + anchorOrigin={{horizontal: 'left', vertical: 'top'}} + targetOrigin={{horizontal: 'left', vertical: 'top'}} + > + this.globalUI.showDialog(DIALOG.WALLET.DEPOSIT)}/> + this.globalUI.showDialog(DIALOG.WALLET.WITHDRAW)}/> + +
+ : +
+ {/*}*/} + {/*label="Deposit"*/} + {/*style={{marginRight: 20}}*/} + {/*onClick={() => this.globalUI.showDialog(DIALOG.WALLET.DEPOSIT)}*/} + {/*primary={true}/>*/} + } + label="Top Up" + onClick={() => this.setModalTopup(true)} + primary={true}/> +
+ } + +
+
+
- {/*}*/} - {/*label="Deposit"*/} - {/*style={{marginRight: 20}}*/} - {/*onClick={() => this.globalUI.showDialog(DIALOG.WALLET.DEPOSIT)}*/} - {/*primary={true}/>*/} - } - label="Top Up" - onClick={() => this.setModalTopup(true)} - primary={true}/> -
- } - - - - -
- } - messageStyle={{textAlign: 'center'}} - backgroundStyle={{backgroundColor: 'rgba(255,255,255,0.5)'}}> - {` - // return { - // onClick: () => { - // this.props.history.push(`${LINKS.ORDER}/${record.id}`); - // }, // click row - // }; - // }} - /> - {/**/} - {/**/} - {/**/} + } + messageStyle={{textAlign: 'center'}} + backgroundStyle={{backgroundColor: 'rgba(255,255,255,0.5)'}}> + {` + // return { + // onClick: () => { + // this.props.history.push(`${LINKS.ORDER}/${record.id}`); + // }, // click row + // }; + // }} + /> + {/*
*/} + {/**/} + {/**/} {/*Id*/} + {/*style={{height: 'auto',width:'13%'}}>Id*/} {/*Date*/} + {/*style={{height: 'auto'}}>Date*/} {/*Type*/} + {/*style={{height: 'auto'}}>Type*/} {/*Status*/} + {/*style={{height: 'auto'}}>Status*/} {/*Amount*/} - {/**/} - {/**/} - {/**/} - {/*{*/} + {/*style={{height: 'auto'}}>Amount*/} + {/**/} + {/**/} + {/**/} + {/*{*/} {/*(this.transactionStore.isSearching ? this.transactionStore.transactionListFiltered : this.transactionStore.list).map((item, index) => {*/} - {/*return (*/} - {/**/} - {/**/} - {/*{item.id.split('-')[0]}*/} - {/**/} - {/*{moment(item.created_at).format('MMMM Do YYYY, hh:mm:ss')}*/} - {/*{item.type.name}*/} - {/*{item.status === 'created' ? 'Waiting Approved' : item.status}*/} - {/**/} - {/**/} - {/*);*/} + {/*return (*/} + {/**/} + {/**/} + {/*{item.id.split('-')[0]}*/} + {/**/} + {/*{moment(item.created_at).format('MMMM Do YYYY, hh:mm:ss')}*/} + {/*{item.type.name}*/} + {/*{item.status === 'created' ? 'Waiting Approved' : item.status}*/} + {/**/} + {/**/} + {/*);*/} {/*})*/} - {/*}*/} - {/*{*/} + {/*}*/} + {/*{*/} {/*(this.transactionStore.list.length === 0) ?*/} - {/**/} - {/**/} - {/**/} - {/**/} - {/* : ""*/} - {/*}*/} - {/**/} - {/*
*/} -
+ {/**/} + {/**/} + {/**/} + {/**/} + {/* : ""*/} + {/*}*/} + {/**/} + {/**/} + +
+
-
+
+ +
+ this.setModalTopup(false)} onCancel={() => this.setModalTopup(false)} isVisible={this.state.modalTopup} />
- this.setModalTopup(false)} onCancel={() => this.setModalTopup(false)} isVisible={this.state.modalTopup} /> -
+ ) } }