Skip to content

Commit aebe60e

Browse files
authored
Merge pull request #625 from Priyanka0205-CSE/fix/friends-empty-state
fix: add empty state to Friends page when no followers/following
2 parents 02f0402 + 48da29d commit aebe60e

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

src/pages/Friends.jsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,16 +362,25 @@ export const Friends = () => {
362362
))}
363363
</div>
364364
) : (
365-
<Card className="p-8 text-center">
365+
<Card className="p-8 text-center">
366366
<UsersRound className="w-10 h-10 text-slate-300 dark:text-slate-600 mx-auto mb-3" />
367367
<h3 className="font-black text-slate-900 dark:text-white my-0">
368368
No developers here yet
369369
</h3>
370+
<h3 className="font-black text-slate-900 dark:text-white my-0">No friends yet!</h3>
370371
<p className="text-sm text-slate-500 dark:text-slate-400 mt-1">
371372
{activeTab === "leaderboard"
372373
? "Follow other developers to populate your Friends Leaderboard."
373-
: "Follow developers from suggestions to grow this section instantly."}
374+
: activeTab === "followers"
375+
? "You don't have any followers yet. Share your profile to get noticed!"
376+
: "You're not following anyone yet. Discover developers to follow!"}
374377
</p>
378+
<button
379+
onClick={() => window.location.href = '/leaderboard'}
380+
className="mt-4 px-4 py-2 bg-violet-600 hover:bg-violet-700 text-white text-sm font-bold rounded-lg transition-colors"
381+
>
382+
Discover Developers
383+
</button>
375384
</Card>
376385
)}
377386
</div>

src/routes/AppRoutes.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ export const AppRoutes = () => {
324324
element={<CardBuilder />}
325325
/>
326326
<Route path="/dashboard/profile/:username" element={<Profile />} />
327+
<Route path="/dashboard/profile/:username/*" element={<Profile />} />
327328
<Route path="/dashboard/settings" element={<SettingsPage />} />
328329
<Route path="/dashboard/auditor" element={<Auditor />} />
329330
<Route path="/dashboard/repo-health" element={<RepoHealth />} />

0 commit comments

Comments
 (0)