Skip to content

Commit da38c3d

Browse files
added leaderboard data
1 parent 2b4e12f commit da38c3d

2 files changed

Lines changed: 16 additions & 15 deletions

File tree

src/app/leaderboard/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default function LeaderBoard() {
5353

5454
return (
5555
<div className="p-4">
56-
{isError && <div className="text-red-500">Error fetching team data</div>}
56+
{isError && <div className="text-red-500">Error fetching leaderboard data</div>}
5757

5858
{isLoading && (
5959
<div className="flex justify-center">

src/app/users/page.tsx

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default function Users() {
5959
try {
6060
const blob = await downloadCSV();
6161

62-
const url = window.URL.createObjectURL(blob.data as Blob);
62+
const url = window.URL.createObjectURL(blob as Blob);
6363
const a = document.createElement("a");
6464
a.href = url;
6565
a.download = "users.csv"; // Set the filename for the downloaded file
@@ -87,7 +87,7 @@ export default function Users() {
8787
<Button onClick={onClick}>Download CSV </Button>
8888
</div>
8989

90-
{isError && <div className="text-red-500">Error fetching team data</div>}
90+
{isError && <div className="text-red-500">Error fetching user data</div>}
9191

9292
{isLoading && (
9393
<div className="flex justify-center">
@@ -100,18 +100,19 @@ export default function Users() {
100100
/>
101101
</div>
102102
)}
103-
104-
<div className="w-full overflow-hidden">
105-
<DataTable<User, string>
106-
setPageLimit={setPageLimit}
107-
pageLimit={pageLimit}
108-
columns={userCol}
109-
data={userList?.users ?? []}
110-
// data={oosers}
111-
handleNextPage={handleNextPage}
112-
handlePrevPage={handlePrevPage}
113-
/>
114-
</div>
103+
{!isLoading && (
104+
<div className="w-full overflow-hidden">
105+
<DataTable<User, string>
106+
setPageLimit={setPageLimit}
107+
pageLimit={pageLimit}
108+
columns={userCol}
109+
data={userList?.users ?? []}
110+
// data={oosers}
111+
handleNextPage={handleNextPage}
112+
handlePrevPage={handlePrevPage}
113+
/>
114+
</div>
115+
)}
115116
</div>
116117
);
117118
}

0 commit comments

Comments
 (0)