fix: Resolve remaining build errors (setState in effect, unused vars)
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
TableHeader,
|
||||
TableRow,
|
||||
} from "@/components/ui/table"
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
|
||||
import { format } from "date-fns"
|
||||
import { tr } from "date-fns/locale"
|
||||
import { Badge } from "@/components/ui/badge"
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Badge } from "@/components/ui/badge"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
import { Separator } from "@/components/ui/separator"
|
||||
import { ArrowLeft, Calendar, Clock, MapPin, User, CreditCard } from "lucide-react"
|
||||
import { ArrowLeft, Calendar, MapPin, User, CreditCard } from "lucide-react"
|
||||
import Link from "next/link"
|
||||
import { PaymentList } from "./payment-list"
|
||||
import { StatusActions } from "./status-actions"
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
} from "@/components/ui/dropdown-menu"
|
||||
import { ChevronDown } from "lucide-react"
|
||||
|
||||
export function StatusActions({ id, currentStatus }: { id: string, currentStatus: string }) {
|
||||
export function StatusActions({ id }: { id: string, currentStatus: string }) {
|
||||
const [loading, setLoading] = useState(false)
|
||||
|
||||
async function handleStatusChange(status: string) {
|
||||
@@ -20,7 +20,7 @@ export function StatusActions({ id, currentStatus }: { id: string, currentStatus
|
||||
setLoading(true)
|
||||
try {
|
||||
await updateStatus(id, status)
|
||||
} catch (error) {
|
||||
} catch {
|
||||
alert("Durum güncellenirken hata oluştu")
|
||||
} finally {
|
||||
setLoading(false)
|
||||
|
||||
@@ -11,7 +11,9 @@ export function MobileSidebar({ user }: { user?: { name: string | null; email: s
|
||||
const [isMounted, setIsMounted] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
setIsMounted(true)
|
||||
// Defer state update to avoid synchronous set-state-in-effect warning
|
||||
const timer = setTimeout(() => setIsMounted(true), 0)
|
||||
return () => clearTimeout(timer)
|
||||
}, [])
|
||||
|
||||
if (!isMounted) {
|
||||
|
||||
Reference in New Issue
Block a user