Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
cederstrom committed Nov 1, 2018
1 parent 5792beb commit 5b94d02
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
8 changes: 4 additions & 4 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Component } from "react";
import React from "react";
import {
ActivityIndicator,
View,
Expand All @@ -12,7 +12,7 @@ import Footer from "./components/Footer";
import BouyCard from "./components/BouyCard";
import Header from "./components/Header";

export default class FetchExample extends Component {
export default class FetchExample extends React.Component {
constructor(props) {
super(props);
this.state = { isLoading: true };
Expand Down Expand Up @@ -49,14 +49,14 @@ export default class FetchExample extends Component {
render() {
if (this.state.isLoading) {
return (
<View style={{ flex: 1, padding: 20 }}>
<View style={{ flex: 1 }}>
<ActivityIndicator />
</View>
);
}

return (
<View style={{ flex: 1, paddingTop: 20 }}>
<View style={{ flex: 1 }}>
<Header />
<ScrollView
contentContainerStyle={{ paddingBottom: 20 }}
Expand Down
6 changes: 5 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@
"description":
"Visa aktuella badtemperaturer vid stränderna i Karlskrona kommun.",
"githubUrl": "https://github.com/cederstrom/karlskrona-badtemperatur",
"version": "1.0.0",
"version": "1.0.1",
"slug": "badtemperatur-i-karlskrona",
"privacy": "public",
"sdkVersion": "27.0.0",
"android": {
"versionCode": 2,
"package": "com.cederstrom.badtemp"
},
"ios": {
"bundleIdentifier": "com.cederstrom.badtemp"
},
"splash": {
"image": "./assets/splash.png",
"resizeMode": "cover"
Expand Down
15 changes: 15 additions & 0 deletions components/Header.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react";
import { StyleSheet, StatusBar, Platform } from "react-native";
import { Header } from "react-native-elements";

export default class FetchExample extends React.Component {
Expand All @@ -13,7 +14,21 @@ export default class FetchExample extends React.Component {
text: "Badtemperaturer i Karlskrona",
style: { color: "#fff", fontSize: 20 }
}}
outerContainerStyles={styles.header}
/>
);
}
}

const styles = StyleSheet.create({
header: {
...(Platform.OS === "android"
? {
paddingTop: 15 + StatusBar.currentHeight,
height: 85
}
: { height: 85 }),
paddingBottom: 15,
borderBottomWidth: 0
}
});

0 comments on commit 5b94d02

Please sign in to comment.