hata düzeltme 3
This commit is contained in:
@@ -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