diff --git a/src/layout/SideBar.tsx b/src/layout/SideBar.tsx
index 23ebfb4..c444410 100644
--- a/src/layout/SideBar.tsx
+++ b/src/layout/SideBar.tsx
@@ -1,8 +1,6 @@
import React from "react";
import Panel from "@component/Panel";
-import Label from "@component/Label";
-import Link from "@component/Link";
-import { Box, BoxProps, Flex } from "@chakra-ui/react";
+import { Box, BoxProps } from "@chakra-ui/react";
import StripedTable from "@component/StrippedTable";
import { trpc } from "@util/trpc";
@@ -10,25 +8,21 @@ export interface LayoutProps extends BoxProps {}
const SideBar = (props: LayoutProps) => {
const topPlayers = trpc.player.top5.useQuery();
- const status = trpc.status.status.useQuery();
return (
[
- {
- text: `${index + 1}. ${player.name}`,
- href: `/character/${player.name}`,
- },
- {
- text: player.level.toString(),
- },
- ])
- }
+ body={topPlayers.data?.map((player, index) => [
+ {
+ text: `${index + 1}. ${player.name}`,
+ href: `/character/${player.name}`,
+ },
+ {
+ text: player.level.toString(),
+ },
+ ])}
/>
diff --git a/src/layout/TopBar/TopBarItem.tsx b/src/layout/TopBar/TopBarItem.tsx
index 82ddc60..d886f50 100644
--- a/src/layout/TopBar/TopBarItem.tsx
+++ b/src/layout/TopBar/TopBarItem.tsx
@@ -6,7 +6,7 @@ export interface TopBarItemProps extends BoxProps {
export const TopBarItem = ({ children, ...props }: TopBarItemProps) => {
return (
-
+
{children}
);
diff --git a/src/layout/TopBar/index.tsx b/src/layout/TopBar/index.tsx
index 52d3be7..7006774 100644
--- a/src/layout/TopBar/index.tsx
+++ b/src/layout/TopBar/index.tsx
@@ -1,4 +1,4 @@
-import { Flex, Text } from "@chakra-ui/react";
+import { Flex, Text, Box } from "@chakra-ui/react";
import { TopBarItem } from "./TopBarItem";
import { trpc } from "@util/trpc";
@@ -8,6 +8,7 @@ export const TopBar = () => {
return (
+
{status?.onlineCount ?? "..."}
@@ -16,6 +17,7 @@ export const TopBar = () => {
players online
+
);