This repository was archived by the owner on Feb 23, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +31
-12
lines changed
Expand file tree Collapse file tree 2 files changed +31
-12
lines changed Original file line number Diff line number Diff line change @@ -48,20 +48,29 @@ const ChannelDetailView = ({ store, nav }) => (
4848 < DetailField name = "Status" >
4949 { store . selectedChannel . statusLabel }
5050 </ DetailField >
51+ { store . selectedChannel . timeTilAvailable ? (
52+ < DetailField name = "Time Til Available" >
53+ { store . selectedChannel . timeTilAvailable }
54+ </ DetailField >
55+ ) : null }
5156 < DetailField name = "Capacity" >
5257 { store . selectedChannel . capacityLabel } { store . unitLabel }
5358 </ DetailField >
5459 < DetailField name = "Balance" >
5560 { store . selectedChannel . localBalanceLabel } { store . unitLabel }
5661 </ DetailField >
57- < View style = { styles . btnWrapper } >
58- < Button
59- style = { styles . deleteBtn }
60- onPress = { ( ) => nav . goChannelDelete ( ) }
61- >
62- < ButtonText style = { styles . deleteBtnText } > CLOSE CHANNEL</ ButtonText >
63- </ Button >
64- </ View >
62+ { ! / c l o s e | c l o s i n g / i. test ( store . selectedChannel . status ) ? (
63+ < View style = { styles . btnWrapper } >
64+ < Button
65+ style = { styles . deleteBtn }
66+ onPress = { ( ) => nav . goChannelDelete ( ) }
67+ >
68+ < ButtonText style = { styles . deleteBtnText } >
69+ CLOSE CHANNEL
70+ </ ButtonText >
71+ </ Button >
72+ </ View >
73+ ) : null }
6574 </ Card >
6675 </ MainContent >
6776 </ SplitBackground >
Original file line number Diff line number Diff line change 11import React from 'react' ;
2- import { StyleSheet } from 'react-native' ;
2+ import { View , StyleSheet } from 'react-native' ;
33import { observer } from 'mobx-react' ;
44import PropTypes from 'prop-types' ;
55import Background from '../component/background' ;
@@ -24,6 +24,9 @@ const styles = StyleSheet.create({
2424 color : color . pinkSig ,
2525 fontSize : font . sizeS ,
2626 } ,
27+ bottomPadding : {
28+ paddingBottom : 30 ,
29+ } ,
2730} ) ;
2831
2932const ChannelDetailView = ( { store, nav } ) => (
@@ -59,9 +62,16 @@ const ChannelDetailView = ({ store, nav }) => (
5962 < DetailField name = "Balance" >
6063 { store . selectedChannel . localBalanceLabel } { store . unitLabel }
6164 </ DetailField >
62- < Button style = { styles . deleteBtn } onPress = { ( ) => nav . goChannelDelete ( ) } >
63- < ButtonText style = { styles . deleteBtnText } > CLOSE CHANNEL</ ButtonText >
64- </ Button >
65+ { ! / c l o s e | c l o s i n g / i. test ( store . selectedChannel . status ) ? (
66+ < Button
67+ style = { styles . deleteBtn }
68+ onPress = { ( ) => nav . goChannelDelete ( ) }
69+ >
70+ < ButtonText style = { styles . deleteBtnText } > CLOSE CHANNEL</ ButtonText >
71+ </ Button >
72+ ) : (
73+ < View style = { styles . bottomPadding } />
74+ ) }
6575 </ Modal >
6676 </ MainContent >
6777 </ Background >
You can’t perform that action at this time.
0 commit comments