function formatTimeSimple(timestamp: string): string {
    const date = new Date(timestamp);
    const now = new Date();
  
    const hours = date.getHours();
    const minutes = date.getMinutes();
  
    const formattedHours = hours % 12 || 12;
    const formattedMinutes = minutes.toString().padStart(2, '0');
    const ampm = hours >= 12 ? 'PM' : 'AM';
  
    const timeStr = `${formattedHours}:${formattedMinutes}${ampm}`;
  
    const isSameDay =
      date.getDate() === now.getDate() &&
      date.getMonth() === now.getMonth() &&
      date.getFullYear() === now.getFullYear();

      return timeStr;
  
    // if (isSameDay) {
    //   return timeStr; // Just show time
    // } else {
    //   const options: Intl.DateTimeFormatOptions = { month: 'short', day: 'numeric' };
    //   const dateStr = date.toLocaleDateString(undefined, options); // e.g., "May 5"
    //   return `${dateStr}, ${timeStr}`;
    // }
  }
  
  export default formatTimeSimple;
  