From 28accf8f7b227a2788f864cef654810860341fe0 Mon Sep 17 00:00:00 2001 From: arsam Date: Fri, 18 Sep 2026 23:25:10 +0330 Subject: [PATCH] Import source: app/src/pages/DirectoryListPage Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality. --- app/src/pages/DirectoryListPage.jsx | 67 +++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 app/src/pages/DirectoryListPage.jsx diff --git a/app/src/pages/DirectoryListPage.jsx b/app/src/pages/DirectoryListPage.jsx new file mode 100644 index 0000000..d10434a --- /dev/null +++ b/app/src/pages/DirectoryListPage.jsx @@ -0,0 +1,67 @@ +import { useState, useMemo } from 'react'; +import { TeknavData } from '../../teknav-data.js'; +import { useNav, EmptyState, inputStyle } from '../../teknav-ui.jsx'; + +export function DirectoryListPage() { + const { navigate } = useNav(); + const [companies] = useState(() => TeknavData.companies ?? []); + const [search, setSearch] = useState(''); + + const filtered = useMemo(() => { + if (!search.trim()) return companies; + const q = search.trim().toLocaleLowerCase('fa-IR'); + return companies.filter((c) => + c.name.toLocaleLowerCase('fa-IR').includes(q) || + c.description.toLocaleLowerCase('fa-IR').includes(q) || + (c.techStack || []).some((t) => t.toLocaleLowerCase('en-US').includes(q)), + ); + }, [companies, search]); + + return ( +
+ +

+ دایرکتوری شرکت‌های فناوری ایران +

+

+ پروفایل شرکت‌های فناوری ایران همراه با استک فنی، اطلاعات تماس و نشان تأیید. +

+ setSearch(e.target.value)} + style={{ ...inputStyle, marginBottom: 24, width: '100%', maxWidth: 400 }} + /> + {filtered.length === 0 && ( + + )} +
+ {filtered.map((company) => ( +
navigate(`/directory/${company.slug}`)} + style={{ background: '#fff', border: '1px solid #E4DDD2', borderRadius: 12, padding: 20, cursor: 'pointer', transition: 'box-shadow 0.2s' }} + onMouseEnter={(e) => { e.currentTarget.style.boxShadow = '0 4px 16px rgba(0,0,0,0.1)'; }} + onMouseLeave={(e) => { e.currentTarget.style.boxShadow = ''; }} + > +
+ {company.name} + {company.verified && ✓ تأیید} +
+

{company.description.slice(0, 100)}…

+
+ {(company.techStack || []).slice(0, 4).map((t) => ( + {t} + ))} +
+
+ ))} +
+
+ ); +}