fix: Resolve remaining build errors (setState in effect, unused vars)

This commit is contained in:
2025-12-07 19:34:26 +03:00
parent 57d84d0a20
commit be64c9201a
4 changed files with 7 additions and 5 deletions

View File

@@ -8,7 +8,7 @@ import {
TableHeader, TableHeader,
TableRow, TableRow,
} from "@/components/ui/table" } from "@/components/ui/table"
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import { format } from "date-fns" import { format } from "date-fns"
import { tr } from "date-fns/locale" import { tr } from "date-fns/locale"
import { Badge } from "@/components/ui/badge" import { Badge } from "@/components/ui/badge"

View File

@@ -6,7 +6,7 @@ import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button" import { Button } from "@/components/ui/button"
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import { Separator } from "@/components/ui/separator" 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 Link from "next/link"
import { PaymentList } from "./payment-list" import { PaymentList } from "./payment-list"
import { StatusActions } from "./status-actions" import { StatusActions } from "./status-actions"

View File

@@ -11,7 +11,7 @@ import {
} from "@/components/ui/dropdown-menu" } from "@/components/ui/dropdown-menu"
import { ChevronDown } from "lucide-react" 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) const [loading, setLoading] = useState(false)
async function handleStatusChange(status: string) { async function handleStatusChange(status: string) {
@@ -20,7 +20,7 @@ export function StatusActions({ id, currentStatus }: { id: string, currentStatus
setLoading(true) setLoading(true)
try { try {
await updateStatus(id, status) await updateStatus(id, status)
} catch (error) { } catch {
alert("Durum güncellenirken hata oluştu") alert("Durum güncellenirken hata oluştu")
} finally { } finally {
setLoading(false) setLoading(false)

View File

@@ -11,7 +11,9 @@ export function MobileSidebar({ user }: { user?: { name: string | null; email: s
const [isMounted, setIsMounted] = useState(false) const [isMounted, setIsMounted] = useState(false)
useEffect(() => { 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) { if (!isMounted) {