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(() => {