hata düzeltme 3
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import Link from "next/link"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Plus, Pencil, Trash2, GripVertical } from "lucide-react"
|
||||
import { getSliders, deleteSlider } from "./actions"
|
||||
import { Plus, Pencil, GripVertical } from "lucide-react"
|
||||
import { getSliders } from "./actions"
|
||||
import { Card, CardContent } from "@/components/ui/card"
|
||||
import Image from "next/image"
|
||||
import { Badge } from "@/components/ui/badge"
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
import { useState, useRef } from "react"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Input } from "@/components/ui/input"
|
||||
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 { createClient } from "@/lib/supabase-browser"
|
||||
import { toast } from "sonner"
|
||||
@@ -62,9 +61,9 @@ export function ImageUpload({ value, onChange, onRemove, disabled }: ImageUpload
|
||||
onChange(publicUrl)
|
||||
toast.success("Resim yüklendi ve optimize edildi.")
|
||||
|
||||
} catch (error: any) {
|
||||
} catch (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 {
|
||||
setLoading(false)
|
||||
if (fileInputRef.current) {
|
||||
|
||||
Reference in New Issue
Block a user