From 5a175875ae615127396ed4733d13775ec4bf1560 Mon Sep 17 00:00:00 2001 From: Clas Wen Date: Tue, 30 Sep 2025 00:16:06 +0800 Subject: [PATCH] remove loading state --- src/pages/repair/RepairLandingSection.tsx | 32 +---------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/src/pages/repair/RepairLandingSection.tsx b/src/pages/repair/RepairLandingSection.tsx index a69f7a0..513f0ed 100644 --- a/src/pages/repair/RepairLandingSection.tsx +++ b/src/pages/repair/RepairLandingSection.tsx @@ -1,5 +1,5 @@ import { useState, useEffect } from "react" -import { Button, Spinner, Card, CardBody, CardFooter } from "@heroui/react" +import { Button, Card, CardBody, CardFooter } from "@heroui/react" import { makeLogtoClient } from "../../utils/auth" import { saturdayClient } from "../../utils/client" import RepairHistoryCard from "./RepairHistoryCard" @@ -13,7 +13,6 @@ type PublicEvent = components["schemas"]["PublicEvent"] export default function RepairLandingSection() { const [userInfo, setUserInfo] = useState(null) - const [loading, setLoading] = useState(true) const [recentEvents, setRecentEvents] = useState([]) const [selectedEvent, setSelectedEvent] = useState(null) const [isEditOpen, setIsEditOpen] = useState(false) @@ -36,9 +35,6 @@ export default function RepairLandingSection() { catch (error) { console.error("Error checking auth status:", error) } - finally { - setLoading(false) - } } const fetchRecentEvents = async () => { @@ -118,16 +114,6 @@ export default function RepairLandingSection() { window.location.href = "/repair/history" } - if (loading) { - return ( -
-
- -
-
- ) - } - return (
{/* Main service section - always shown */} @@ -199,22 +185,6 @@ export default function RepairLandingSection() {
)} - {/* Login suggestion for unauthenticated users */} - {/* {!userInfo && ( -
- - 登入 - - )} - > - 登入账号来查看和管理你的维修记录 - -
- )} */} - {/* Edit Modal */} {selectedEvent && (