-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
48 lines (40 loc) · 1.08 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import { useState } from "react";
import { BottomNavigation, Text } from "react-native-paper";
import { ApolloProvider } from "@apollo/client";
import { client } from "./src/services/graphql/client";
import Home from "./src/components/Home";
import Groups from "./src/components/Groups";
import Macthes from "./src/components/Matches";
export default function App() {
const [index, setIndex] = useState(0);
const [routes] = useState([
{
key: "teams",
title: "Teams",
},
{
key: "groups",
title: "Groups",
},
{
key: "matches",
title: "Matches",
},
]);
const renderScene = BottomNavigation.SceneMap({
teams: () => <Home />,
groups: () => <Groups />,
matches: () => <Macthes />,
});
return (
<ApolloProvider client={client}>
<BottomNavigation
navigationState={{ index, routes }}
onIndexChange={setIndex}
renderScene={renderScene}
barStyle={{ backgroundColor: "#AA4A44" }}
safeAreaInsets={{ top: 0, bottom: 12, left: 0, right: 0 }}
/>
</ApolloProvider>
);
}