hata düzeltme 3

This commit is contained in:
2026-01-13 23:51:30 +03:00
parent 70f61a76b0
commit 759bf2fbdd
2 changed files with 5 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
import Link from "next/link" import Link from "next/link"
import { Button } from "@/components/ui/button" import { Button } from "@/components/ui/button"
import { Plus, Pencil, Trash2, GripVertical } from "lucide-react" import { Plus, Pencil, GripVertical } from "lucide-react"
import { getSliders, deleteSlider } from "./actions" import { getSliders } from "./actions"
import { Card, CardContent } from "@/components/ui/card" import { Card, CardContent } from "@/components/ui/card"
import Image from "next/image" import Image from "next/image"
import { Badge } from "@/components/ui/badge" import { Badge } from "@/components/ui/badge"

View File

@@ -2,9 +2,8 @@
import { useState, useRef } from "react" import { useState, useRef } from "react"
import { Button } from "@/components/ui/button" import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label" import { Label } from "@/components/ui/label"
import { Loader2, Upload, X, Image as ImageIcon } from "lucide-react" import { Loader2, Upload, X } from "lucide-react"
import imageCompression from "browser-image-compression" import imageCompression from "browser-image-compression"
import { createClient } from "@/lib/supabase-browser" import { createClient } from "@/lib/supabase-browser"
import { toast } from "sonner" import { toast } from "sonner"
@@ -62,9 +61,9 @@ export function ImageUpload({ value, onChange, onRemove, disabled }: ImageUpload
onChange(publicUrl) onChange(publicUrl)
toast.success("Resim yüklendi ve optimize edildi.") toast.success("Resim yüklendi ve optimize edildi.")
} catch (error: any) { } catch (error) {
console.error("Upload error:", error) console.error("Upload error:", error)
toast.error("Resim yüklenirken hata oluştu: " + error.message) toast.error("Resim yüklenirken hata oluştu: " + (error as Error).message)
} finally { } finally {
setLoading(false) setLoading(false)
if (fileInputRef.current) { if (fileInputRef.current) {