theme update latest project
This commit is contained in:
@@ -9,15 +9,11 @@ import {
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import {
|
||||
removeNotification,
|
||||
clearAllNotifications,
|
||||
markAsRead,
|
||||
markAllAsRead,
|
||||
} from '../../redux/notificationSlice';
|
||||
import LinearGradient from 'react-native-linear-gradient';
|
||||
import { Ionicons } from '@react-native-vector-icons/ionicons';
|
||||
import LucideIcon from '../../components/common/LucideIcon';
|
||||
import AppView from '../../components/AppView';
|
||||
import Header from '../../components/common/Header';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { useNotificationHandler } from '../hook/useNotificationHandler';
|
||||
import colors from '../../components/colors';
|
||||
|
||||
@@ -28,7 +24,6 @@ type FilterType = 'all' | 'JOIN_REQUEST' | 'CONTRIBUTION' | 'CONTRIBUTION_ACK' |
|
||||
|
||||
const Notification = () => {
|
||||
const dispatch = useDispatch();
|
||||
const navigation = useNavigation();
|
||||
const { handleMarkAsReadAndNavigate } = useNotificationHandler();
|
||||
const notifications = useSelector(
|
||||
(state: any) => state.notifications.notifications
|
||||
@@ -41,10 +36,6 @@ const Notification = () => {
|
||||
dispatch(removeNotification(messageId));
|
||||
};
|
||||
|
||||
const handleClearAll = () => {
|
||||
dispatch(clearAllNotifications());
|
||||
};
|
||||
|
||||
const handleMarkAsRead = (messageId: string, screen: string, groupId: string, cycleNumber: string, contributionId: string) => {
|
||||
console.log("screen type : ", screen);
|
||||
handleMarkAsReadAndNavigate(
|
||||
@@ -63,10 +54,6 @@ const Notification = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const handleMarkAllAsRead = () => {
|
||||
dispatch(markAllAsRead());
|
||||
};
|
||||
|
||||
const formatTime = (timestamp: number) => {
|
||||
const date = new Date(timestamp);
|
||||
const now = new Date();
|
||||
@@ -181,7 +168,8 @@ const Notification = () => {
|
||||
<AppView>
|
||||
{/* Header with actions */}
|
||||
<Header
|
||||
title={`Notifications ${unreadCount > 0 ? `(${unreadCount})` : ''}`} arrowColor='#000' titleColor='#000'/>
|
||||
title={`Notifications ${unreadCount > 0 ? `(${unreadCount})` : ''}`}
|
||||
/>
|
||||
{/* <View style={styles.headerActions}>
|
||||
{unreadCount > 0 && (
|
||||
<LinearGradient
|
||||
@@ -226,7 +214,7 @@ const Notification = () => {
|
||||
<View style={styles.notificationContent}>
|
||||
{/* Icon */}
|
||||
<View style={styles.iconContainer}>
|
||||
<Ionicons
|
||||
<LucideIcon
|
||||
name={getNotificationIcon(item.data.msgType)}
|
||||
size={24}
|
||||
color={getNotificationColor(item.data.msgType)}
|
||||
@@ -272,7 +260,7 @@ const Notification = () => {
|
||||
onPress={() => handleDelete(item.messageId)}
|
||||
style={styles.deleteButton}
|
||||
>
|
||||
<Ionicons name="trash-outline" size={20} color={colors.pastelPink} /> {/* Pastel Pink */}
|
||||
<LucideIcon name="trash-outline" size={20} color={colors.pastelPink} /> {/* Pastel Pink */}
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
@@ -282,7 +270,7 @@ const Notification = () => {
|
||||
}}
|
||||
ListEmptyComponent={
|
||||
<View style={styles.emptyContainer}>
|
||||
<Ionicons name="notifications-off-outline" size={64} color="#D3D3D3" /> {/* Pastel Gray */}
|
||||
<LucideIcon name="notifications-off-outline" size={64} color="#D3D3D3" /> {/* Pastel Gray */}
|
||||
<Text style={styles.emptyText}>No notifications yet</Text>
|
||||
<Text style={styles.emptySubtext}>
|
||||
When you get notifications, they'll appear here
|
||||
@@ -422,4 +410,4 @@ const styles = StyleSheet.create({
|
||||
textAlign: 'center',
|
||||
lineHeight: 20,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user