From 54ceb69dd0b26848499ae56cdeccac65aed1f6ef Mon Sep 17 00:00:00 2001 From: Krao Hasanee Date: Wed, 13 May 2026 12:07:47 -0400 Subject: [PATCH] Sort company tabs alphabetically on projects page Co-Authored-By: Claude Sonnet 4.6 --- src/pages/client/MyProjects.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/client/MyProjects.jsx b/src/pages/client/MyProjects.jsx index 8ef3a47..1954a41 100755 --- a/src/pages/client/MyProjects.jsx +++ b/src/pages/client/MyProjects.jsx @@ -115,7 +115,7 @@ export default function MyProjects() { const [submissions, setSubmissions] = useState([]); const [loading, setLoading] = useState(true); const [filter, setFilter] = useState('all'); // 'all' | 'mine' - const companies = currentUser.companies?.length ? currentUser.companies : (currentUser.company ? [currentUser.company] : []); + const companies = (currentUser.companies?.length ? currentUser.companies : (currentUser.company ? [currentUser.company] : [])).slice().sort((a, b) => a.name.localeCompare(b.name)); const [activeCompanyId, setActiveCompanyId] = useState(() => companies[0]?.id || null); useEffect(() => {