Delete 'src/screens/HomeScreen.js.old'

removing per notes in issue #3
This commit is contained in:
kake26 2022-02-22 16:17:00 +01:00
parent 2179b63abe
commit 26c032c6fb

View file

@ -1,74 +0,0 @@
import React from 'react';
import {
Button,
} from 'react-native-elements';
import {
View,
Text,
} from 'react-native';
// play,pause,stop icons
import { AntDesign } from '@expo/vector-icons';
import { MaterialCommunityIcons } from '@expo/vector-icons';
import axios from 'axios'; // Took a while to figure out how to use it, but its simpler then the
function bp(name) {
// Button press handler important
axios.get('http://192.168.1.158:8080/'+name)
.then(res => {
// We don't care fore now
})
}
class HomeScreen extends React.Component {
static navigationOptions = ({ navigation }) => {
return {
title: navigation.getParam('otherParam', 'RPI Media Center Control'),
headerStyle: {
backgroundColor: '#3333ff',
},
headerTintColor: '#fff',
};
};
render() {
return (
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center'}}>
<Text>Controls</Text>
<Button
title="Select file to play" type="outline"
onPress={() => this.props.navigation.navigate('Files')}
/><Text>{"\n"}</Text>
<View style={{flexDirection: 'row' }}>
<Button
icon={<AntDesign name="pausecircleo" size={24} color="black" />} title="Pause" type="outline"
onPress = {() => bp('pause/')}
/>
<Button
icon={<AntDesign name="playcircleo" size={24} color="black" />} title="Resume" type="outline"
onPress = {() => bp('resume/')}
/>
<Button
icon={<MaterialCommunityIcons name="stop-circle-outline" size={24} color="black" />} title="Stop" type="outline"
onPress = {() => bp('stop/')}
/><Text>{"\n"}</Text>
</View>
<Text>{"\n"}</Text>
<Button
title="Settings" type="outline"
onPress={() => this.props.navigation.navigate('Settings')}
/><Text>{"\n"}</Text>
<Button
title="About" type="outline"
onPress={() => this.props.navigation.navigate('About')}
/>
</View>
);
}
}
export default HomeScreen;