2020-03-07 09:23:17 +01:00
|
|
|
/**
|
|
|
|
* Sample React Native App
|
|
|
|
* https://github.com/facebook/react-native
|
|
|
|
*
|
|
|
|
* @format
|
|
|
|
* @flow
|
|
|
|
*/
|
|
|
|
|
2020-03-14 11:35:35 +01:00
|
|
|
import React, { useState } from "react";
|
|
|
|
import {
|
|
|
|
Appbar,
|
|
|
|
BottomNavigation,
|
|
|
|
Text,
|
|
|
|
Card,
|
|
|
|
} from "react-native-paper";
|
|
|
|
|
|
|
|
|
|
|
|
function Dummy() {
|
|
|
|
return (
|
|
|
|
<Card>
|
|
|
|
<Card.Title title="Card Title" />
|
|
|
|
<Card.Content>
|
|
|
|
<Text>Dummy</Text>
|
|
|
|
</Card.Content>
|
|
|
|
</Card>
|
|
|
|
);
|
|
|
|
}
|
2020-03-07 09:23:17 +01:00
|
|
|
|
2020-03-12 18:14:38 +01:00
|
|
|
const App = () => {
|
2020-03-14 11:35:35 +01:00
|
|
|
const [ pane, setPane ] = useState({
|
|
|
|
index: 0,
|
|
|
|
routes: [
|
|
|
|
{ key: "update", title: "Update", icon: "plus-circle" },
|
|
|
|
{ key: "statistics", title: "Statistics", icon: "file-chart" },
|
|
|
|
{ key: "timetable", title: "Time Table", icon: "calendar-clock" },
|
|
|
|
],
|
|
|
|
});
|
|
|
|
const renderScene = BottomNavigation.SceneMap({
|
|
|
|
update: Dummy,
|
|
|
|
statistics: Dummy,
|
|
|
|
timetable: Dummy,
|
|
|
|
});
|
2020-03-12 18:14:38 +01:00
|
|
|
return (
|
|
|
|
<>
|
2020-03-14 11:35:35 +01:00
|
|
|
<Appbar.Header>
|
|
|
|
<Appbar.Content
|
|
|
|
title="Sonzai"
|
|
|
|
/>
|
|
|
|
</Appbar.Header>
|
|
|
|
<BottomNavigation
|
|
|
|
navigationState={pane}
|
|
|
|
onIndexChange={(index) => setPane({
|
|
|
|
index,
|
|
|
|
routes: pane.routes
|
|
|
|
})}
|
|
|
|
renderScene={renderScene}
|
|
|
|
shifting={true}
|
|
|
|
/>
|
2020-03-12 18:14:38 +01:00
|
|
|
</>
|
|
|
|
);
|
2020-03-07 09:23:17 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
export default App;
|