diff --git a/.replit b/.replit index b94bf6b..a031cc2 100644 --- a/.replit +++ b/.replit @@ -26,10 +26,18 @@ externalPort = 5173 localPort = 37531 externalPort = 3001 +[[ports]] +localPort = 38049 +externalPort = 5000 + [[ports]] localPort = 38387 externalPort = 3003 +[[ports]] +localPort = 41425 +externalPort = 6000 + [[ports]] localPort = 43349 externalPort = 3000 diff --git a/client/src/components/MainContent.tsx b/client/src/components/MainContent.tsx index df444ec..ba75d1b 100644 --- a/client/src/components/MainContent.tsx +++ b/client/src/components/MainContent.tsx @@ -61,6 +61,14 @@ export default function MainContent() { ); return filtered.sort((a, b) => { + const aHasArticles = (articleCountByOutlet[a.id] || 0) > 0; + const bHasArticles = (articleCountByOutlet[b.id] || 0) > 0; + + // First, sort by NEW badge (outlets with articles come first) + if (aHasArticles && !bHasArticles) return -1; + if (!aHasArticles && bHasArticles) return 1; + + // Within same group (both have or both don't have articles), sort by chosen method if (sortBy === "alphabetical") { return a.name.localeCompare(b.name); } else {