-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implemented home screen and catalog screen of user
- Loading branch information
1 parent
6139a5f
commit 5b0ff98
Showing
9 changed files
with
698 additions
and
33 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from "react"; | ||
import { View, FlatList, SafeAreaView, StyleSheet } from "react-native"; | ||
|
||
import { MultipleFilters } from "./ProfilesSearchBar"; | ||
|
||
export const CatalogComponent = ({ data, renderItem }) => { | ||
return ( | ||
<SafeAreaView style={{ flexGrow: 1 }}> | ||
<View style={styles.container}> | ||
<MultipleFilters /> | ||
<View style={{ width: "100%", height: "90%" }}> | ||
<FlatList | ||
data={data} | ||
renderItem={renderItem} | ||
keyExtractor={(item, index) => index.toString()} | ||
horizontal={false} | ||
showsVerticalScrollIndicator={false} | ||
contentContainerStyle={{ flexGrow: 1 }} | ||
/> | ||
</View> | ||
</View> | ||
</SafeAreaView> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
alignItems: "center", | ||
justifyContent: "center", | ||
backgroundColor: "#fff", | ||
}, | ||
}); |
154 changes: 154 additions & 0 deletions
154
careconnect/navigators/NannyHiringUserStackNavigator.js
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,154 @@ | ||
import React from "react"; | ||
import { createStackNavigator } from "@react-navigation/stack"; | ||
import { AnimatedTabBarNavigator } from "react-native-animated-nav-tab-bar"; | ||
import NanniesCatalogUserScreen from "../screens/nannies catalog/NanniesCatalogUserScreen"; | ||
import SettingsScreen from "../screens/settings/SettingsScreen"; | ||
import ProfileScreen from "../screens/profile/ProfileScreen"; | ||
import NotificationsScreen from "../screens/notifications/NotificationsScreen"; | ||
import { useIsFocused, useNavigation } from "@react-navigation/native"; | ||
|
||
import { Ionicons, MaterialCommunityIcons, MaterialIcons, FontAwesome } from "@expo/vector-icons"; | ||
import { Image, StyleSheet, TouchableOpacity } from "react-native"; | ||
|
||
const Tab = AnimatedTabBarNavigator(); | ||
const Stack = createStackNavigator(); | ||
|
||
const NannyHiringTabNavigator = () => { | ||
const isFocused = useIsFocused(); | ||
const navigation = useNavigation(); | ||
return ( | ||
<Tab.Navigator | ||
screenOptions={{ | ||
headerShown: false, | ||
}} | ||
tabBarOptions={{ | ||
activeTintColor: "#FA89B8", | ||
tabStyle: { height: 75 }, | ||
}} | ||
appearance={{ | ||
topPadding: 10, | ||
bottomPadding: -8, | ||
activeTabBackgrounds: "#F1E7E8", | ||
whenInactiveShow: "icon-only", | ||
dotSize: "small", | ||
tabButtonLayout: "vertical", | ||
}} | ||
> | ||
<Tab.Screen | ||
name="Nannies Catalog Page" | ||
component={NanniesCatalogUserScreen} | ||
options={{ | ||
tabBarLabel: "Home", | ||
tabBarLabelStyle: { | ||
fontFamily: "FiraSansRegular", | ||
fontSize: 10, | ||
}, | ||
tabBarIcon: ({ color, focused }) => ( | ||
<Ionicons | ||
name={focused ? "home" : "home-outline"} | ||
size={18} | ||
color={color} | ||
onPress={() => { | ||
if (isFocused) { | ||
navigation.navigate("User", { screen: "User Home Page" }); | ||
} | ||
}} | ||
/> | ||
), | ||
}} | ||
/> | ||
<Tab.Screen | ||
name="Settings Page" | ||
component={SettingsScreen} | ||
options={{ | ||
tabBarLabel: "Settings", | ||
tabBarLabelStyle: { | ||
fontFamily: "FiraSansRegular", | ||
fontSize: 10, | ||
}, | ||
tabBarIcon: ({ color, focused }) => ( | ||
<Ionicons name={focused ? "settings" : "settings-outline"} size={18} color={color} /> | ||
), | ||
}} | ||
/> | ||
<Tab.Screen | ||
name="Profile Page" | ||
component={ProfileScreen} | ||
options={{ | ||
tabBarLabel: "Profile", | ||
tabBarLabelStyle: { | ||
fontFamily: "FiraSansRegular", | ||
fontSize: 10, | ||
}, | ||
tabBarIcon: ({ color, focused }) => ( | ||
<MaterialCommunityIcons | ||
name={focused ? "account" : "account-outline"} | ||
size={18} | ||
color={color} | ||
/> | ||
), | ||
}} | ||
/> | ||
<Tab.Screen | ||
name="Notifications Page" | ||
component={NotificationsScreen} | ||
options={{ | ||
tabBarLabel: "Notifications", | ||
tabBarLabelStyle: { | ||
fontFamily: "FiraSansRegular", | ||
fontSize: 10, | ||
}, | ||
tabBarIcon: ({ color, focused }) => ( | ||
<MaterialIcons | ||
name={focused ? "notifications" : "notifications-none"} | ||
size={18} | ||
color={color} | ||
/> | ||
), | ||
}} | ||
/> | ||
</Tab.Navigator> | ||
); | ||
}; | ||
|
||
const NannyHiringUserStackNavigator = ({ navigation }) => { | ||
const HeaderLogo = () => { | ||
return <Image style={styles.logo} source={require("../assets/icons/logo-no-bg.png")} />; | ||
}; | ||
|
||
return ( | ||
<Stack.Navigator | ||
screenOptions={{ | ||
headerBackTitleVisible: false, | ||
headerTitle: HeaderLogo, | ||
headerStyle: styles.headerStyle, | ||
headerTintColor: "#fff", | ||
// todo: icon should be profile pic of user | ||
// headerRight: () => ( | ||
// <TouchableOpacity | ||
// onPress={() => navigation.navigate("WelcomeScreen", { screen: "Welcome Page" })} | ||
// > | ||
// <FontAwesome name="user-circle" size={38} color="black" style={{ right: 10 }} /> | ||
// </TouchableOpacity> | ||
// ), | ||
}} | ||
> | ||
<Stack.Screen name="NannyHiringTabNavigator" component={NannyHiringTabNavigator} /> | ||
</Stack.Navigator> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
headerStyle: { | ||
backgroundColor: "#FA89B8", | ||
height: 110, | ||
}, | ||
logo: { | ||
resizeMode: "contain", | ||
aspectRatio: 0.9, | ||
right: 85, | ||
top: -5, | ||
}, | ||
}); | ||
|
||
export default NannyHiringUserStackNavigator; |
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
Oops, something went wrong.