From d2ef5845d004a0caef11972a322688439aeb8a55 Mon Sep 17 00:00:00 2001 From: Zotov Ivan Yuryevich Date: Fri, 3 Apr 2026 22:45:39 +0300 Subject: [PATCH] delete unused ImageWithFallback figma component --- src/components/Services.tsx | 1 - src/components/figma/ImageWithFallback.tsx | 27 ---------------------- 2 files changed, 28 deletions(-) delete mode 100644 src/components/figma/ImageWithFallback.tsx diff --git a/src/components/Services.tsx b/src/components/Services.tsx index 6d1e4e0..0294728 100644 --- a/src/components/Services.tsx +++ b/src/components/Services.tsx @@ -1,5 +1,4 @@ import { Cloud, Shield, Cpu, Database, Server, Settings } from 'lucide-react'; -import { ImageWithFallback } from './figma/ImageWithFallback'; const services = [ { diff --git a/src/components/figma/ImageWithFallback.tsx b/src/components/figma/ImageWithFallback.tsx deleted file mode 100644 index 95bd7ee..0000000 --- a/src/components/figma/ImageWithFallback.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React, { useState } from 'react'; - -const ERROR_IMG_SRC = - 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODgiIGhlaWdodD0iODgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvcGFjaXR5PSIuMyIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIzLjciPjxyZWN0IHg9IjE2IiB5PSIxNiIgd2lkdGg9IjU2IiBoZWlnaHQ9IjU2IiByeD0iNiIvPjxwYXRoIGQ9Im0xNiA1OCAxNi0xOCAzMiAzMiIvPjxjaXJjbGUgY3g9IjUzIiBjeT0iMzUiIHI9IjciLz48L3N2Zz4KCg==' - -export function ImageWithFallback(props: React.ImgHTMLAttributes) { - const [didError, setDidError] = useState(false) - - const handleError = () => { - setDidError(true) - } - - const { src, alt, style, className, ...rest } = props - - return didError ? ( -
-
- Error loading image -
-
- ) : ( - {alt} - ) -}