Requeste api implelented

This commit is contained in:
Jaanu423
2025-09-17 16:24:06 +05:30
parent a931f886b2
commit dd603dcff7
13 changed files with 921 additions and 303 deletions
+21 -6
View File
@@ -6,27 +6,40 @@ import {
TouchableOpacity,
UIManager,
Platform,
Image,
} from "react-native";
import AppView from "../../components/AppView";
import UserProfileStatus from "./UserProfileStatus";
import colors from "../../components/colors";
import { Ionicons } from "@react-native-vector-icons/ionicons";
import GroupsTabs from "./GroupsTabs";
import { useSelector } from "react-redux";
import { useNavigation } from "@react-navigation/native";
// Enable animation for Android
if (Platform.OS === "android" && UIManager.setLayoutAnimationEnabledExperimental) {
UIManager.setLayoutAnimationEnabledExperimental(true);
}
const Home = () => {
const user = useSelector((state: any) => state.user);
const navigation = useNavigation();
console.log("redux user data in Home:", user);
return (
<AppView barStyle="dark-content">
<AppView barStyle="dark-content" style={styles.container}>
{/* Header */}
<View style={styles.header}>
<Text style={styles.greeting}>Hello, Pooja 👋</Text>
<TouchableOpacity>
<Ionicons
<Text style={styles.greeting}>Hello, {user.firstName} {user.lastName}👋</Text>
<TouchableOpacity onPress={() => navigation.navigate("Profile" as never)}>
{/* <Ionicons
name="person-circle-outline"
size={40}
color={colors.primary}
/> */}
<Image
source={
user.imageBlob
&& { uri: user.imageBlob ? `data:image/jpeg;base64,${user.imageBlob}` : user.profilePicture }
}
style={{ width: 40, height: 40, borderRadius: 20, borderColor: colors.primary, borderWidth: 2 }}
/>
</TouchableOpacity>
</View>
@@ -40,14 +53,16 @@ const Home = () => {
export default Home;
const styles = StyleSheet.create({
container: {},
container: {
paddingBottom: '25%',
},
header: {
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
marginBottom: 12,
},
greeting: { fontSize: 22, fontWeight: "600", color: colors.textDark },
greeting: { fontSize: 22, fontWeight: "600", color: colors.Home },
});