diff --git a/packages/apps/dashboard/ui-2024/src/components/Home/Leaderboard/components/Table/Table.tsx b/packages/apps/dashboard/ui-2024/src/components/Home/Leaderboard/components/Table/Table.tsx index d119588495..a3e9a2728a 100644 --- a/packages/apps/dashboard/ui-2024/src/components/Home/Leaderboard/components/Table/Table.tsx +++ b/packages/apps/dashboard/ui-2024/src/components/Home/Leaderboard/components/Table/Table.tsx @@ -150,12 +150,10 @@ export const Table = ({ zIndex: 2, backgroundColor: colorPalette.whiteBackground, '&::after': { - content: '""', - position: 'absolute', - bottom: '0', - right: '0', - height: index === 0 ? '85%' : '100%', - width: '1px', + ...getAfterElementProperties( + index === 0, + visibleRows.length === index + 1 + ), backgroundColor: `${colorPalette.skyOpacity}`, }, }, @@ -208,3 +206,39 @@ export const Table = ({ ); }; + +function getAfterElementProperties( + isFirstElement: boolean, + isLastElement: boolean +) { + if (isFirstElement) { + return { + content: '""', + position: 'absolute', + bottom: '0', + right: '0', + height: '85%', + width: '1px', + }; + } + + if (isLastElement) { + return { + content: '""', + position: 'absolute', + top: '0', + right: '0', + height: '85%', + width: '1px', + }; + } + + return { + content: '""', + position: 'absolute', + bottom: '0', + right: '0', + height: '100%', + width: '1px', + }; +} diff --git a/packages/apps/dashboard/ui-2024/src/services/api/use-leaderboard-details.tsx b/packages/apps/dashboard/ui-2024/src/services/api/use-leaderboard-details.tsx index e3261251c5..1e4641d19e 100644 --- a/packages/apps/dashboard/ui-2024/src/services/api/use-leaderboard-details.tsx +++ b/packages/apps/dashboard/ui-2024/src/services/api/use-leaderboard-details.tsx @@ -41,7 +41,7 @@ export function useLeaderboardDetails() { return useQuery({ queryFn: async () => { const { data } = await httpService.get(apiPaths.leaderboardDetails.path, { - params: { chainId }, + params: { chainId: chainId === -1 ? undefined : chainId }, }); const validResponse = validateResponse(