This commit is contained in:
Jaanu423
2025-10-16 15:23:46 +05:30
parent be6d465a28
commit 79cf7470d4
3 changed files with 292 additions and 236 deletions
+4 -13
View File
@@ -66,8 +66,8 @@ const userActions: ActionItem[] = [
const Home: React.FC = () => {
const user = useSelector((state: any) => state.user);
const notifications = useSelector(
(state: any) => state.notifications.notifications
);
(state: any) => state.notifications.notifications
);
const navigation = useNavigation<TabNavigationProp>();
const dispatch = useDispatch();
@@ -97,7 +97,6 @@ const Home: React.FC = () => {
} else if (item.action === "TRANSACTION") {
navigation.navigate("TransactionList" as never);
} else if (item.action === "NAVIGATE_CREATE_GROUP") {
navigation.navigate("GroupCreation" as never);
} else {
ToastAndroid.show(`Unknown action: ${item.title}`, ToastAndroid.SHORT);
@@ -133,13 +132,12 @@ const Home: React.FC = () => {
<Text style={styles.userName}>{user.firstName || apiUser?.firstName || 'User'}</Text>
</View>
<TouchableOpacity onPress={() => navigation.navigate("Notification" as never)}>
{/* <Image source={getProfileImageUri()} style={styles.profileImage} /> */}
<Text style={{position: 'absolute', right: -6, top: -4, backgroundColor: colors.danger, color: colors.white, borderRadius: 8, width: 16, height: 16, textAlign: 'center', fontSize: 10, fontWeight: 'bold', lineHeight: 16, zIndex: 1}}>{unreadCount > 0 ? unreadCount : ''}</Text>
<Text style={{ position: 'absolute', right: -6, top: -4, backgroundColor: colors.danger, color: colors.white, borderRadius: 8, width: 16, height: 16, textAlign: 'center', fontSize: 10, fontWeight: 'bold', lineHeight: 16, zIndex: 1 }}>{unreadCount > 0 ? unreadCount : ''}</Text>
<Ionicons name="notifications-outline" size={30} color={colors.textDark} />
</TouchableOpacity>
</View>
<UserProfileStatus />
<UserProfileStatus profileImage={getProfileImageUri()} />
<Text style={styles.sectionTitle}>Quick Actions</Text>
@@ -178,13 +176,6 @@ const styles = StyleSheet.create({
fontWeight: 'bold',
color: colors.textDark,
},
profileImage: {
width: 50,
height: 50,
borderRadius: 25,
borderColor: colors.pastelPink, // Using pastelPink for border
borderWidth: 2,
},
sectionTitle: {
fontSize: 20,
fontWeight: '600',