import React from "react"; import Notification from "../../components/Notification"; const Notifications = () => { let notifications = [ { id: 1, type: "success", message: "Your profile has been updated successfully.", timestamp: "2024-09-26T10:00:00Z", isRead: false, }, { id: 2, type: "warning", message: "Your subscription is about to expire in 3 days.", timestamp: "2024-09-25T09:30:00Z", isRead: false, }, { id: 3, type: "info", message: "New mentor has joined your network.", timestamp: "2024-09-24T15:45:00Z", isRead: false, }, { id: 4, type: "error", message: "Failed to connect to the video call. Please try again.", timestamp: "2024-09-26T08:20:00Z", isRead: false, }, { id: 5, type: "error", message: "Failed to connect to the video call. Please try again.", timestamp: "2024-09-26T08:20:00Z", isRead: false, }, { id: 6, type: "error", message: "Failed to connect to the video call. Please try again.", timestamp: "2024-09-26T08:20:00Z", isRead: false, }, { id: 7, type: "error", message: "Failed to connect to the video call. Please try again.", timestamp: "2024-09-26T08:20:00Z", isRead: false, }, { id: 8, type: "error", message: "Failed to connect to the video call. Please try again.", timestamp: "2024-09-26T08:20:00Z", isRead: false, }, { id: 9, type: "error", message: "Failed to connect to the video call. Please try again.", timestamp: "2024-09-26T08:20:00Z", isRead: false, }, { id: 10, type: "error", message: "Failed to connect to the video call. Please try again.", timestamp: "2024-09-26T08:20:00Z", isRead: false, }, ]; // for getting day name by time string // const dateStr = '2024-09-26T04:31:50.646+00:00'; // const date = new Date(dateStr); // const dayName = date.toLocaleDateString('en-US', { weekday: 'long' }); // console.log(dayName); // Output: "Thursday" // for converting the to get time in am or pm // const utcDateStr = '2024-09-26T04:31:50.646+00:00'; // const date = new Date(utcDateStr); // India TimeZone is Asia/Kolkata, which is UTC+5:30 // const options = { // timeZone: 'Asia/Kolkata', // hour: 'numeric', // minute: 'numeric', // second: 'numeric', // hour12: true, // year: 'numeric', // month: 'long', // day: 'numeric' // }; // const istDate = date.toLocaleString('en-US', options); // console.log(istDate); // Output: "September 26, 2024, 10:01:50 AM" return ( <>

Notifications

{notifications.map((notification) => ( ))}
); }; export default Notifications;