Commit 058c88c0 authored by W.D.R.P. Sandeepa's avatar W.D.R.P. Sandeepa

Merge branch 'it18218640' into 'master'

add table.js file

See merge request !124
parents 383cab84 c7b7716a
import React from 'react';
import { View, StyleSheet, ScrollView } from 'react-native';
import { Table, TableWrapper, Row, Rows, Col } from 'react-native-table-component';
const CONTENT = {
tableHead: ['Date', 'Time', 'Name', 'Result'],
tableData: [
['1 jan 2022', '2s', 'Red', 'Good'],
['2 jan 2022', '2s', 'Green', 'Good'],
['3 jan 2022', '2s', 'Black', 'Good'],
['4 jan 2022', '2s', 'White', 'Good'],
['5 jan 2022', '2s', 'Blue', 'Good'],
['6 jan 2022', '2s', 'Yellow', 'Good'],
],
};
export default function App() {
return (
<ScrollView>
<View style={styles.container}>
<Table borderStyle={{ borderWidth: 3, borderColor: '#fff' }}>
<Row
data={CONTENT.tableHead}
flexArr={[1, 1, 1, 1]}
style={styles.head}
textStyle={styles.text}
/>
<TableWrapper style={styles.wrapper}>
<Rows
data={CONTENT.tableData}
flexArr={[1, 1, 1, 1]}
style={styles.row}
textStyle={styles.text}
/>
</TableWrapper>
</Table>
</View>
</ScrollView >
);
}
const styles = StyleSheet.create({
container: { flex: 0, paddingTop: 20, paddingLeft: 60, paddingRight: 60, marginTop: 0, },
head: { height: 60,},
wrapper: { flexDirection: 'row' },
title: { flex: 1, },
row: { height: 40 },
text: { textAlign: 'center', fontSize: 20, color: '#fff', fontFamily: 'Menlo' },
});
\ No newline at end of file
......@@ -15,7 +15,8 @@ import {
SafeAreaView,
ImageBackground,
Button,
Image
Image,
StatusBar
} from 'react-native'
import Permissions from 'react-native-permissions';
......@@ -31,6 +32,8 @@ export default function Blue(color) {
React.useEffect(() => {
StatusBar.setHidden(true);
audioInit();
const unsubscribe = navigation.addListener("focus", () => {
......@@ -129,7 +132,7 @@ export default function Blue(color) {
try {
const res = await client.post('http://192.168.8.101:5000/predict', formData, {
const res = await client.post('predict', formData, {
headers: {
Accept: 'application/json',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment