MCPcopy Create free account
hub / github.com/TryCatchLearn/Overflow / TopUsers

Function TopUsers

webapp/src/components/TopUsers.tsx:3–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import {getTopUsers} from "@/lib/actions/profile-actions";
2
3export default async function TopUsers() {
4 const {data: users, error} = await getTopUsers();
5
6 return (
7 <div className='bg-primary-50 p-6 rounded-2xl'>
8 <h3 className='text-2xl text-secondary mb-5 text-center'>Most points this week</h3>
9 <div className='flex flex-col px-6 gap-3'>
10 {error ? (
11 <div>Unavailable</div>
12 ): (
13 <>
14 {users?.map(u => (
15 <div className='flex justify-between items-center' key={u.userId}>
16 <div>{u.profile.displayName}</div>
17 <div>{u.delta}</div>
18 </div>
19 ))}
20 </>
21 )}
22
23
24 </div>
25 </div>
26 );
27}

Callers

nothing calls this directly

Calls 1

getTopUsersFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…