feat(notifications): add notification system and wire order/dispute events

This commit is contained in:
zetaloop
2026-02-23 11:05:04 +08:00
parent 2222dccbb7
commit c986539954
7 changed files with 214 additions and 17 deletions
+16 -8
View File
@@ -56,7 +56,7 @@ export default function NotificationsPage() {
const systemNotifs = notifications.filter((notification) => notification.type === "system")
return (
<div className="max-w-2xl space-y-6">
<div className="max-w-2xl mx-auto space-y-6">
<div className="flex items-center justify-between">
<div className="flex items-center gap-2">
<h1 className="text-2xl font-bold"></h1>
@@ -76,13 +76,21 @@ export default function NotificationsPage() {
<TabsTrigger value="system"></TabsTrigger>
</TabsList>
<TabsContent value="all" className="space-y-2 mt-4">
{notifications.map((notification) => (
<NotificationItem key={notification.id} notification={notification} />
))}
<TabsContent value="all" className="space-y-3 mt-4">
{notifications.length === 0 ? (
<Card>
<CardContent className="py-8 text-center text-sm text-muted-foreground">
</CardContent>
</Card>
) : (
notifications.map((notification) => (
<NotificationItem key={notification.id} notification={notification} />
))
)}
</TabsContent>
<TabsContent value="order" className="space-y-2 mt-4">
<TabsContent value="order" className="space-y-3 mt-4">
{orderNotifs.length === 0 ? (
<Card>
<CardContent className="py-8 text-center text-sm text-muted-foreground">
@@ -94,7 +102,7 @@ export default function NotificationsPage() {
)}
</TabsContent>
<TabsContent value="community" className="space-y-2 mt-4">
<TabsContent value="community" className="space-y-3 mt-4">
{communityNotifs.length === 0 ? (
<Card>
<CardContent className="py-8 text-center text-sm text-muted-foreground">
@@ -106,7 +114,7 @@ export default function NotificationsPage() {
)}
</TabsContent>
<TabsContent value="system" className="space-y-2 mt-4">
<TabsContent value="system" className="space-y-3 mt-4">
{systemNotifs.length === 0 ? (
<Card>
<CardContent className="py-8 text-center text-sm text-muted-foreground">