Skip to content

Commit 103b18e

Browse files
committed
Hide blank building images
1 parent 2be09c7 commit 103b18e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

source/views/building-hours/detail/building.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,16 @@ export class BuildingDetail extends React.Component<void, Props, void> {
5757

5858
const headerImage = info.image && buildingImages.hasOwnProperty(info.image)
5959
? buildingImages[info.image]
60-
: transparentPixel
60+
: null
6161
const openStatus = getShortBuildingStatus(info, now)
6262
const schedules = info.schedule || []
6363

6464
return (
6565
<ScrollView contentContainerStyle={styles.container}>
66-
<Image source={headerImage} resizeMode="cover" style={styles.image} />
66+
{headerImage
67+
? <Image source={headerImage} resizeMode="cover" style={styles.image} />
68+
: null
69+
}
6770

6871
<Header building={info} />
6972
<Badge status={openStatus} />

0 commit comments

Comments
 (0)