fix: broken route links — dispute notification, chat hardcoding, dead sidebar link
This commit is contained in:
@@ -7,7 +7,7 @@ import { Badge } from "@/components/ui/badge"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
|
||||
import { mockOrders } from "@/lib/mock-data"
|
||||
import { mockChatSessions, mockOrders } from "@/lib/mock-data"
|
||||
import type { OrderStatus } from "@/lib/types"
|
||||
import { cn } from "@/lib/utils"
|
||||
import { useAuthStore } from "@/store/auth"
|
||||
@@ -101,14 +101,18 @@ export default function OrderListPage() {
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex gap-2">
|
||||
{order.status === "in_progress" && (
|
||||
<Button variant="outline" size="sm" asChild>
|
||||
<Link href={`/chat/chat1`}>
|
||||
<MessageSquare className="mr-1 h-3.5 w-3.5" />
|
||||
聊天
|
||||
</Link>
|
||||
</Button>
|
||||
)}
|
||||
{order.status === "in_progress" &&
|
||||
(() => {
|
||||
const session = mockChatSessions.find((s) => s.orderId === order.id)
|
||||
return session ? (
|
||||
<Button variant="outline" size="sm" asChild>
|
||||
<Link href={`/chat/${session.id}`}>
|
||||
<MessageSquare className="mr-1 h-3.5 w-3.5" />
|
||||
聊天
|
||||
</Link>
|
||||
</Button>
|
||||
) : null
|
||||
})()}
|
||||
{order.status === "completed" && (
|
||||
<Button variant="outline" size="sm">
|
||||
<RefreshCw className="mr-1 h-3.5 w-3.5" />
|
||||
|
||||
Reference in New Issue
Block a user