diff --git a/packages/website/src/components/PlaylistOrder.tsx b/packages/website/src/components/PlaylistOrder.tsx
index 37519dd3e..c73238131 100644
--- a/packages/website/src/components/PlaylistOrder.tsx
+++ b/packages/website/src/components/PlaylistOrder.tsx
@@ -1,20 +1,7 @@
-import {
- ChevronUpIcon,
- DoubleArrowDownIcon,
- DoubleArrowUpIcon,
- MinusCircledIcon,
-} from "@radix-ui/react-icons";
-import {
- Button,
- Checkbox,
- ChevronDownIcon,
- Flex,
- IconButton,
- Table,
-} from "@radix-ui/themes";
+import { Button, Flex, Table } from "@radix-ui/themes";
import { useLocale } from "../hooks/useLocale";
import { Playlist } from "../stores/playlist";
-import { TankRowHeaderCell } from "./TankRowHeaderCell";
+import { PlaylistTankEntry } from "./PlaylistTankEntry";
export function PlaylistOrder() {
const { strings } = useLocale();
@@ -47,115 +34,12 @@ export function PlaylistOrder() {
{list.map(({ tank, checked }, index) => (
-
- {
- Playlist.mutate((draft) => {
- draft.list![index].checked = !checked;
- });
- }}
- >
-
-
-
-
-
-
-
- {
- Playlist.mutate((draft) => {
- draft.list!.splice(index, 1);
- });
- }}
- style={{
- borderTopRightRadius: 0,
- borderBottomRightRadius: 0,
- }}
- >
-
-
-
- {
- const item = list[index];
- Playlist.mutate((draft) => {
- draft.list!.splice(index, 1);
- draft.list!.push(item);
- });
- }}
- >
-
-
-
- {
- const item = list[index];
- Playlist.mutate((draft) => {
- draft.list!.splice(index, 1);
- draft.list!.unshift(item);
- });
- }}
- >
-
-
-
- {
- const item = list[index];
- Playlist.mutate((draft) => {
- const newIndex = index + 1;
- draft.list!.splice(index, 1);
- draft.list!.splice(newIndex, 0, item);
- });
- }}
- >
-
-
-
- {
- const item = list[index];
- Playlist.mutate((draft) => {
- const newIndex = index - 1;
- draft.list!.splice(index, 1);
- draft.list!.splice(newIndex, 0, item);
- });
- }}
- style={{
- borderTopLeftRadius: 0,
- borderBottomLeftRadius: 0,
- }}
- >
-
-
-
-
-
+
))}
diff --git a/packages/website/src/components/PlaylistTankEntry.tsx b/packages/website/src/components/PlaylistTankEntry.tsx
new file mode 100644
index 000000000..1e4c2a517
--- /dev/null
+++ b/packages/website/src/components/PlaylistTankEntry.tsx
@@ -0,0 +1,64 @@
+import type { TankDefinition } from "@blitzkit/core";
+import { DragHandleDots2Icon, MinusCircledIcon } from "@radix-ui/react-icons";
+import { Checkbox, Flex, IconButton, Table, Text } from "@radix-ui/themes";
+import { Playlist } from "../stores/playlist";
+import { TankRowHeaderCell } from "./TankRowHeaderCell";
+
+interface Props {
+ tank: TankDefinition;
+ checked: boolean;
+ index: number;
+}
+
+export function PlaylistTankEntry({ tank, checked, index }: Props) {
+ return (
+
+ {
+ Playlist.mutate((draft) => {
+ draft.list![index].checked = !checked;
+ });
+ }}
+ >
+
+
+
+
+
+
+
+ {
+ Playlist.mutate((draft) => {
+ draft.list!.splice(index, 1);
+ });
+ }}
+ >
+
+
+
+
+
+
+
+
+
+
+
+ );
+}