Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit dd433fc

Browse files
committed
Do not display close btn on channel details screen on mobile
1 parent badabeb commit dd433fc

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/view/channel-detail-mobile.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,18 @@ const ChannelDetailView = ({ store, nav }) => (
5454
<DetailField name="Balance">
5555
{store.selectedChannel.localBalanceLabel} {store.unitLabel}
5656
</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>
57+
{!/close|closing/i.test(store.selectedChannel.status) ? (
58+
<View style={styles.btnWrapper}>
59+
<Button
60+
style={styles.deleteBtn}
61+
onPress={() => nav.goChannelDelete()}
62+
>
63+
<ButtonText style={styles.deleteBtnText}>
64+
CLOSE CHANNEL
65+
</ButtonText>
66+
</Button>
67+
</View>
68+
) : null}
6569
</Card>
6670
</MainContent>
6771
</SplitBackground>

0 commit comments

Comments
 (0)