From c7a2755aaf6f7fc553e1e9929d910f1b69107cc9 Mon Sep 17 00:00:00 2001 From: NotII <46204250+NotII@users.noreply.github.com> Date: Sat, 8 Mar 2025 06:35:41 +0000 Subject: [PATCH] notif fix >.< --- components/layout/layout.tsx | 6 +- .../notifications/OrderNotifications.tsx | 228 ++++++++ .../notifications/UnifiedNotifications.tsx | 511 ++++++++++++++++++ 3 files changed, 742 insertions(+), 3 deletions(-) create mode 100644 components/notifications/OrderNotifications.tsx create mode 100644 components/notifications/UnifiedNotifications.tsx diff --git a/components/layout/layout.tsx b/components/layout/layout.tsx index 94bf1b3..62816e8 100644 --- a/components/layout/layout.tsx +++ b/components/layout/layout.tsx @@ -3,8 +3,8 @@ import { useState, useEffect } from "react" import { useTheme } from "next-themes" import Sidebar from "./sidebar" -import ChatNotifications from "@/components/dashboard/ChatNotifications" -import type React from "react" // Added import for React +import UnifiedNotifications from "@/components/notifications/UnifiedNotifications" +import type React from "react" interface LayoutProps { children: React.ReactNode @@ -24,7 +24,7 @@ export default function Layout({ children }: LayoutProps) {
New Paid Order!
+Order #{order.orderId}
+£{order.totalPrice.toFixed(2)}
+No new paid orders
+Order #{order.orderId}
++ {formatPrice(order.totalPrice)} +
+New Paid Order!
+Order #{order.orderId}
+£{order.totalPrice.toFixed(2)}
+No new notifications
++ Customer {chatMetadata[chatId]?.buyerId.slice(-4) || 'Unknown'} +
++ {count} new {count === 1 ? 'message' : 'messages'} +
+Order #{order.orderId}
++ {formatPrice(order.totalPrice)} +
+No unread messages
++ Customer {chatMetadata[chatId]?.buyerId.slice(-4) || 'Unknown'} +
++ {count} new {count === 1 ? 'message' : 'messages'} +
+No new paid orders
+Order #{order.orderId}
++ {formatPrice(order.totalPrice)} +
+