Import source: app/src/pages/CompanyProfilePage
Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality.
This commit is contained in:
@@ -0,0 +1,74 @@
|
|||||||
|
import { TeknavData } from '../../teknav-data.js';
|
||||||
|
import { useNav, EmptyState } from '../../teknav-ui.jsx';
|
||||||
|
|
||||||
|
export function CompanyProfilePage({ slug }) {
|
||||||
|
const { navigate } = useNav();
|
||||||
|
const company = (TeknavData.companies ?? []).find((c) => c.slug === slug);
|
||||||
|
|
||||||
|
if (!company) {
|
||||||
|
return (
|
||||||
|
<div style={{ padding: '120px 24px', textAlign: 'center', fontFamily: 'Vazirmatn,sans-serif', direction: 'rtl' }}>
|
||||||
|
<EmptyState title="شرکت یافت نشد" subtitle="پروفایل شرکتی با این آدرس وجود ندارد" />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div style={{ maxWidth: 800, margin: '0 auto', padding: '24px 16px 80px', direction: 'rtl', fontFamily: 'Vazirmatn,sans-serif' }}>
|
||||||
|
<nav style={{ fontSize: 13, color: '#5F6B6D', marginBottom: 24, display: 'flex', gap: 8, alignItems: 'center' }}>
|
||||||
|
<span style={{ cursor: 'pointer', color: '#0F6B73' }} onClick={() => navigate('/')}>تکناو</span>
|
||||||
|
<span>›</span>
|
||||||
|
<span style={{ cursor: 'pointer', color: '#0F6B73' }} onClick={() => navigate('/directory')}>دایرکتوری</span>
|
||||||
|
<span>›</span>
|
||||||
|
<span>{company.name}</span>
|
||||||
|
</nav>
|
||||||
|
<div style={{ background: '#0C1E22', borderRadius: 16, padding: '28px 28px', marginBottom: 28, display: 'flex', gap: 20, alignItems: 'flex-start' }}>
|
||||||
|
<div style={{ flex: 1 }}>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: 12, marginBottom: 12 }}>
|
||||||
|
<h1 style={{ fontSize: 'clamp(20px,4vw,28px)', fontWeight: 800, color: '#fff', margin: 0 }}>{company.name}</h1>
|
||||||
|
{company.verified && (
|
||||||
|
<span style={{ background: '#D49A2A', color: '#0C1E22', fontSize: 11, fontWeight: 700, padding: '3px 10px', borderRadius: 20 }}>✓ تأیید شده</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<p style={{ fontSize: 15, color: 'rgba(255,255,255,0.8)', lineHeight: 1.8, margin: 0 }}>{company.description}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{ display: 'flex', gap: 20, flexWrap: 'wrap', marginBottom: 28 }}>
|
||||||
|
{company.websiteUrl && (
|
||||||
|
<a
|
||||||
|
href={company.websiteUrl}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
style={{ display: 'inline-flex', alignItems: 'center', gap: 6, background: '#0F6B73', color: '#fff', padding: '10px 20px', borderRadius: 8, fontSize: 14, fontWeight: 700, textDecoration: 'none' }}
|
||||||
|
>
|
||||||
|
وبسایت ↗
|
||||||
|
</a>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{(company.techStack || []).length > 0 && (
|
||||||
|
<section style={{ marginBottom: 28 }}>
|
||||||
|
<h2 style={{ fontSize: 18, fontWeight: 700, color: '#263238', marginBottom: 12 }}>استک فناوری</h2>
|
||||||
|
<div style={{ display: 'flex', gap: 8, flexWrap: 'wrap' }}>
|
||||||
|
{company.techStack.map((t) => (
|
||||||
|
<span key={t} style={{ background: '#E4DDD2', color: '#263238', fontSize: 13, padding: '5px 14px', borderRadius: 20, fontWeight: 600 }}>{t}</span>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<div style={{ background: '#F8F5F0', borderRadius: 12, padding: 24 }}>
|
||||||
|
<p style={{ fontSize: 14, color: '#5F6B6D', margin: '0 0 12px' }}>
|
||||||
|
این صفحه بخشی از دایرکتوری شرکتهای فناوری تکناو است. اگر این شرکت را نمایندگی میکنید، میتوانید پروفایل آن را ادعا و تأیید کنید.
|
||||||
|
</p>
|
||||||
|
<button
|
||||||
|
style={{ background: '#0F6B73', color: '#fff', border: 'none', borderRadius: 8, padding: '10px 20px', fontSize: 14, fontFamily: 'Vazirmatn,sans-serif', cursor: 'pointer', fontWeight: 700 }}
|
||||||
|
onClick={() => navigate('/login')}
|
||||||
|
>
|
||||||
|
ادعای پروفایل
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user