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.
This commit is contained in:
parent
da50fb144d
commit
8980c70233
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -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<HTMLInputElement>(null)
|
||||
const phoneRef = useRef<HTMLInputElement>(null)
|
||||
const emailRef = useRef<HTMLInputElement>(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 (
|
||||
<div style={{ background: 'rgba(15,23,42,0.85)', backdropFilter: 'blur(12px)', border: '1px solid rgba(255,255,255,0.12)', padding: '28px 32px', color: '#fff', fontSize: 14, fontWeight: 600, textAlign: 'center', maxWidth: 340 }}>
|
||||
✓ {label.done}
|
||||
</div>
|
||||
)
|
||||
|
||||
return (
|
||||
<div style={{
|
||||
background: 'rgba(15,23,42,0.82)', backdropFilter: 'blur(14px)',
|
||||
border: '1px solid rgba(255,255,255,0.12)',
|
||||
padding: '28px 32px', display: 'flex', flexDirection: 'column', gap: 14,
|
||||
minWidth: 300, maxWidth: 360, direction: lang === 'fa' ? 'rtl' : 'ltr',
|
||||
}}>
|
||||
<div style={{ fontSize: 14, fontWeight: 700, color: '#fff', marginBottom: 4 }}>{label.title}</div>
|
||||
{[
|
||||
{ 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 }) => (
|
||||
<input
|
||||
key={placeholder}
|
||||
ref={ref}
|
||||
type={type}
|
||||
placeholder={placeholder}
|
||||
style={{
|
||||
background: 'rgba(255,255,255,0.08)', border: '1px solid rgba(255,255,255,0.15)',
|
||||
color: '#fff', padding: '10px 14px', fontSize: 13, fontFamily: 'inherit',
|
||||
outline: 'none', width: '100%',
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
<button
|
||||
onClick={() => { if (nameRef.current?.value && phoneRef.current?.value) setSent(true) }}
|
||||
style={{
|
||||
background: 'var(--red)', color: '#fff', border: 'none',
|
||||
padding: '11px 0', fontSize: 13, fontWeight: 700,
|
||||
fontFamily: 'inherit', cursor: 'pointer', width: '100%',
|
||||
}}
|
||||
>
|
||||
{label.btn}
|
||||
</button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
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 (
|
||||
<div dir={lang === 'fa' ? 'rtl' : 'ltr'} style={{ background: 'var(--paper)', minHeight: '80vh' }}>
|
||||
|
|
@ -280,7 +225,7 @@ export default function Pulse() {
|
|||
</div>
|
||||
|
||||
{/* Auto-sliding image carousel — radial blur paywall */}
|
||||
<ImageSlider lang={lang} />
|
||||
<ImageSlider />
|
||||
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 16 }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue