From 8980c702336dd48d0b0879eaafcd4caf63b10446 Mon Sep 17 00:00:00 2001 From: Mohammad Jebeli Date: Sun, 31 May 2026 20:03:43 +0330 Subject: [PATCH] fix: remove unused TS variables causing build failure - Remove FACTORIES constant (SteelNewsletterSection.tsx) - Remove unused lang param from ImageSlider (Pulse.tsx) - Remove unused ContactPanel component (Pulse.tsx) - Remove unused requested/setRequested state (Pulse.tsx) Fixes TS6133 errors blocking Docker build. --- .../Home/sections/SteelNewsletterSection.tsx | 14 ----- src/pages/Pulse/Pulse.tsx | 59 +------------------ 2 files changed, 2 insertions(+), 71 deletions(-) diff --git a/src/pages/Home/sections/SteelNewsletterSection.tsx b/src/pages/Home/sections/SteelNewsletterSection.tsx index f19613c..cb4dcec 100644 --- a/src/pages/Home/sections/SteelNewsletterSection.tsx +++ b/src/pages/Home/sections/SteelNewsletterSection.tsx @@ -15,20 +15,6 @@ const ISSUES = { ], } -const FACTORIES = { - fa: [ - { name: 'فولاد مبارکه', capacity: '۷.۸ میلیون تن', location: 'اصفهان', type: 'فولاد تخت' }, - { name: 'ذوب‌آهن اصفهان', capacity: '۴.۲ میلیون تن', location: 'اصفهان', type: 'مقاطع سنگین' }, - { name: 'فولاد خوزستان', capacity: '۳.۲ میلیون تن', location: 'اهواز', type: 'بیلت و شمش' }, - { name: 'فولاد هرمزگان', capacity: '۱.۵ میلیون تن', location: 'هرمزگان', type: 'اسلب' }, - ], - en: [ - { name: 'Mobarakeh Steel', capacity: '7.8 Mt/yr', location: 'Isfahan', type: 'Flat Steel' }, - { name: 'Isfahan Steel', capacity: '4.2 Mt/yr', location: 'Isfahan', type: 'Heavy Sections' }, - { name: 'Khuzestan Steel', capacity: '3.2 Mt/yr', location: 'Ahvaz', type: 'Billet & Slab' }, - { name: 'Hormozgan Steel', capacity: '1.5 Mt/yr', location: 'Hormozgan', type: 'Slab' }, - ], -} const T = { fa: { diff --git a/src/pages/Pulse/Pulse.tsx b/src/pages/Pulse/Pulse.tsx index b495655..12ccd67 100644 --- a/src/pages/Pulse/Pulse.tsx +++ b/src/pages/Pulse/Pulse.tsx @@ -55,7 +55,7 @@ const T = { const SLIDES = Array.from({ length: 13 }, (_, i) => `/${i + 1}.jpg`) -function ImageSlider({ lang }: { lang: 'fa' | 'en' }) { +function ImageSlider() { const [current, setCurrent] = useState(0) useEffect(() => { @@ -121,60 +121,6 @@ function ImageSlider({ lang }: { lang: 'fa' | 'en' }) { ) } -function ContactPanel({ lang }: { lang: 'fa' | 'en' }) { - const [sent, setSent] = useState(false) - const nameRef = useRef(null) - const phoneRef = useRef(null) - const emailRef = useRef(null) - - const label = lang === 'fa' - ? { title: 'برای استفاده لطفاً تماس بگیرید', name: 'نام و نام‌خانوادگی', phone: 'شماره تماس', email: 'ایمیل', btn: 'ارسال', done: 'پیام شما دریافت شد. به‌زودی تماس می‌گیریم.' } - : { title: 'Please contact us to get access', name: 'Full Name', phone: 'Phone Number', email: 'Email', btn: 'Send', done: 'Message received. We\'ll be in touch soon.' } - - if (sent) return ( -
- ✓ {label.done} -
- ) - - return ( -
-
{label.title}
- {[ - { ref: nameRef, placeholder: label.name, type: 'text' }, - { ref: phoneRef, placeholder: label.phone, type: 'tel' }, - { ref: emailRef, placeholder: label.email, type: 'email'}, - ].map(({ ref, placeholder, type }) => ( - - ))} - -
- ) -} function MembershipForm({ lang }: { lang: 'fa' | 'en' }) { const [name, setName] = useState('') @@ -246,7 +192,6 @@ export default function Pulse() { const { lang } = useLang() const t = T[lang] const stats = STATS[lang] - const [requested, setRequested] = useState(false) return (
@@ -280,7 +225,7 @@ export default function Pulse() {
{/* Auto-sliding image carousel — radial blur paywall */} - +