Skip to content

Commit 1affcc6

Browse files
Adez017Copilot
andauthored
Update src/components/dashboard/LeaderBoard/leaderboard.tsx
Co-authored-by: Copilot <[email protected]>
1 parent 41d04bc commit 1affcc6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/components/dashboard/LeaderBoard/leaderboard.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,13 @@ export default function LeaderBoard(): JSX.Element {
151151
setSelectedContributor(null);
152152
};
153153

154-
// Use mock data when there's an error or no contributors
155-
const displayContributors = error || contributors.length === 0 ? mockContributors : contributors;
154+
// Use mock data only in development mode when there's an error or no contributors
155+
const displayContributors =
156+
(error || contributors.length === 0)
157+
? (typeof process !== "undefined" && process.env.NODE_ENV === "development"
158+
? mockContributors
159+
: [])
160+
: contributors;
156161

157162
// Filter out excluded users and then apply search filter
158163
const filteredContributors = displayContributors

0 commit comments

Comments
 (0)