This repository has been archived by the owner on Dec 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4739db7
commit 39cd714
Showing
9 changed files
with
7,419 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from "react"; | ||
import { Text } from "react-native"; | ||
import { Card } from "react-native-elements"; | ||
import moment from "moment/min/moment-with-locales"; | ||
|
||
export default class BouyCard extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
this.item = this.props.item; | ||
} | ||
|
||
render() { | ||
return ( | ||
<Card> | ||
<Text h1 style={{ fontWeight: "bold", fontSize: 20 }}> | ||
{this.item.name} | ||
</Text> | ||
<Text style={{ fontWeight: "bold", fontSize: 35 }}> | ||
{Math.round(this.item.temperature)}°C | ||
</Text> | ||
<Text style={{ color: "gray", fontSize: 10 }}> | ||
Uppdaterad {moment(new Date(this.item.time)).fromNow()} | ||
</Text> | ||
</Card> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import React from "react"; | ||
import { Text, StyleSheet, Linking, View } from "react-native"; | ||
|
||
export default class Footer extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
} | ||
render() { | ||
return ( | ||
<View> | ||
<Text style={styles.footer}> | ||
Byggd av{" "} | ||
<Text | ||
style={styles.link} | ||
onPress={() => | ||
Linking.openURL( | ||
"https://github.com/cederstrom/karlskrona-badtemperatur" | ||
) | ||
} | ||
> | ||
Andreas Cederström | ||
</Text> | ||
{". "} | ||
Baserad på data från Karlskrona kommun och All Binary. Mer info på{" "} | ||
<Text | ||
style={styles.link} | ||
onPress={() => Linking.openURL("https://buoy.ioe.allbin.se")} | ||
> | ||
https://buoy.ioe.allbin.se | ||
</Text> | ||
</Text> | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
footer: { | ||
textAlign: "center", | ||
color: "gray", | ||
paddingTop: 20, | ||
paddingBottom: 20, | ||
padding: 15 | ||
}, | ||
link: { | ||
color: "blue" | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from "react"; | ||
import { Header } from "react-native-elements"; | ||
|
||
export default class FetchExample extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
} | ||
|
||
render() { | ||
return ( | ||
<Header | ||
centerComponent={{ | ||
text: "Badtemperaturer i Karlskrona", | ||
style: { color: "#fff", fontSize: 20 } | ||
}} | ||
/> | ||
); | ||
} | ||
} |
Oops, something went wrong.