-
Notifications
You must be signed in to change notification settings - Fork 12
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
100a92f
commit dad7b2d
Showing
10 changed files
with
1,701 additions
and
130 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,33 @@ | ||
import { StatusBar } from 'expo-status-bar'; | ||
import React from 'react'; | ||
import { StyleSheet, Text, View } from 'react-native'; | ||
import React, { Component } from "react"; | ||
import { Rajdhani_600SemiBold } from "@expo-google-fonts/rajdhani"; | ||
import * as Font from "expo-font"; | ||
|
||
export default function App() { | ||
return ( | ||
<View style={styles.container}> | ||
<Text>Open up App.js to start working on your app!</Text> | ||
<StatusBar style="auto" /> | ||
</View> | ||
); | ||
} | ||
import BottomTabNavigator from "./components/BottomTabNavigator"; | ||
|
||
export default class App extends Component { | ||
constructor() { | ||
super(); | ||
this.state = { | ||
fontLoaded: false | ||
}; | ||
} | ||
|
||
async loadFonts() { | ||
await Font.loadAsync({ | ||
Rajdhani_600SemiBold: Rajdhani_600SemiBold | ||
}); | ||
this.setState({ fontLoaded: true }); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
backgroundColor: '#fff', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
}, | ||
}); | ||
componentDidMount() { | ||
this.loadFonts(); | ||
} | ||
|
||
render() { | ||
const { fontLoaded } = this.state; | ||
if (fontLoaded) { | ||
return <BottomTabNavigator />; | ||
} | ||
return null; | ||
} | ||
} |
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.
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,69 @@ | ||
import React, { Component } from "react"; | ||
import { View } from "react-native"; | ||
import { NavigationContainer } from "@react-navigation/native"; | ||
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; | ||
import Ionicons from "react-native-vector-icons/Ionicons"; | ||
|
||
import TransactionScreen from "../screens/Transaction"; | ||
import SearchScreen from "../screens/Search"; | ||
|
||
const Tab = createBottomTabNavigator(); | ||
|
||
export default class BottomTabNavigator extends Component { | ||
render() { | ||
return ( | ||
<NavigationContainer> | ||
<Tab.Navigator | ||
screenOptions={({ route }) => ({ | ||
tabBarIcon: ({ focused, color, size }) => { | ||
let iconName; | ||
|
||
if (route.name === "Transaction") { | ||
iconName = "book"; | ||
} else if (route.name === "Search") { | ||
iconName = "search"; | ||
} | ||
|
||
// You can return any component that you like here! | ||
return ( | ||
<Ionicons | ||
name={iconName} | ||
size={size} | ||
color={color} | ||
size={size} | ||
/> | ||
); | ||
} | ||
})} | ||
tabBarOptions={{ | ||
activeTintColor: "#FFFFFF", | ||
inactiveTintColor: "black", | ||
style: { | ||
height: 130, | ||
borderTopWidth: 0, | ||
backgroundColor: "#5653d4" | ||
}, | ||
labelStyle: { | ||
fontSize: 20, | ||
fontFamily: "Rajdhani_600SemiBold" | ||
}, | ||
labelPosition: "beside-icon", | ||
tabStyle: { | ||
marginTop: 25, | ||
marginLeft: 10, | ||
marginRight: 10, | ||
borderRadius: 30, | ||
borderWidth: 2, | ||
alignItems: "center", | ||
justifyContent: "center", | ||
backgroundColor: "#5653d4" | ||
} | ||
}} | ||
> | ||
<Tab.Screen name="Transaction" component={TransactionScreen} /> | ||
<Tab.Screen name="Search" component={SearchScreen} /> | ||
</Tab.Navigator> | ||
</NavigationContainer> | ||
); | ||
} | ||
} |
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,16 @@ | ||
import firebase from "firebase"; | ||
require("@firebase/firestore"); | ||
|
||
const firebaseConfig = { | ||
apiKey: "AIzaSyAkp3gQdHbMPD5pCfHbBzIIgFpdCJXD5KM", | ||
authDomain: "wily-app-v2.firebaseapp.com", | ||
projectId: "wily-app-v2", | ||
storageBucket: "wily-app-v2.appspot.com", | ||
messagingSenderId: "772559744213", | ||
appId: "1:772559744213:web:9417b879882f231175065c", | ||
measurementId: "G-H8Y352W6Z2" | ||
}; | ||
|
||
firebase.initializeApp(firebaseConfig); | ||
|
||
export default firebase.firestore(); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React, { Component } from "react"; | ||
import { View, Text, StyleSheet } from "react-native"; | ||
|
||
export default class SearchScreen extends Component { | ||
render() { | ||
return ( | ||
<View style={styles.container}> | ||
<Text style={styles.text}>Search Screen</Text> | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
justifyContent: "center", | ||
alignItems: "center", | ||
backgroundColor: "#5653D4" | ||
}, | ||
text: { | ||
color: "#ffff", | ||
fontSize: 30 | ||
} | ||
}); |
Oops, something went wrong.