Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions frontend/src/ts/components/pages/leaderboard/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { showSimpleModal } from "../../../states/simple-modal";
import { cn } from "../../../utils/cn";
import { Button } from "../../common/Button";
import { LoadingCircle } from "../../common/LoadingCircle";
import { PageIndicator } from "./PageIndicator";

export function Navigation(props: {
lastPage: number;
userPage?: number;
Expand All @@ -26,6 +28,7 @@ export function Navigation(props: {
<Show when={props.isLoading}>
<LoadingCircle color="sub" class="text-2xl" />
</Show>
<PageIndicator currentPage={props.currentPage} />
<Button
onClick={() => props.onPageChange(0)}
fa={{ icon: "fa-crown", fixedWidth: true }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { JSXElement } from "solid-js";

export function PageIndicator(props: { currentPage: number }): JSXElement {
return (
<span class="inline-flex h-min appearance-none items-center justify-center gap-[0.5em] rounded border-0 p-[0.5em] text-center leading-[1.25] text-(--themable-button-text)">
Page {props.currentPage + 1}
</span>
);
}
Loading