diff --git a/src/pages/repair/RepairLandingSection.tsx b/src/pages/repair/RepairLandingSection.tsx index 513f0ed..39f3028 100644 --- a/src/pages/repair/RepairLandingSection.tsx +++ b/src/pages/repair/RepairLandingSection.tsx @@ -1,5 +1,5 @@ import { useState, useEffect } from "react" -import { Button, Card, CardBody, CardFooter } from "@heroui/react" +import { Button } from "@heroui/react" import { makeLogtoClient } from "../../utils/auth" import { saturdayClient } from "../../utils/client" import RepairHistoryCard from "./RepairHistoryCard" @@ -75,31 +75,6 @@ export default function RepairLandingSection() { window.location.href = createRepairPath } - const handleEdit = (event: PublicEvent) => { - setSelectedEvent(event) - setIsEditOpen(true) - } - - const handleCancel = async (event: PublicEvent) => { - try { - const logtoToken = await makeLogtoClient().getAccessToken() - await saturdayClient.DELETE("/client/events/{EventId}", { - params: { - path: { - EventId: event.eventId, - }, - }, - headers: { - Authorization: `Bearer ${logtoToken}`, - }, - }) - await fetchRecentEvents() - } - catch (error) { - console.error("Error cancelling event:", error) - } - } - const handleViewDetail = (event: PublicEvent) => { window.location.href = `/repair/ticket-detail?eventId=${event.eventId}` } @@ -142,7 +117,7 @@ export default function RepairLandingSection() { {/* Recent events section - only for authenticated users */} - {userInfo && ( + {userInfo && recentEvents.length > 0 && (
暂无进行中的维修预约
-