mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-05 12:46:19 -05:00
20 lines
527 B
TypeScript
20 lines
527 B
TypeScript
import { useDroppable } from "@dnd-kit/core";
|
|
import { useTierListState } from "../contexts/TierListContext";
|
|
import { DraggableItem } from "./DraggableItem";
|
|
import styles from "./ItemPool.module.css";
|
|
|
|
export function ItemPool() {
|
|
const { availableItems } = useTierListState();
|
|
const { setNodeRef } = useDroppable({
|
|
id: "item-pool",
|
|
});
|
|
|
|
return (
|
|
<div ref={setNodeRef} className={styles.pool}>
|
|
{availableItems.map((item) => (
|
|
<DraggableItem key={`${item.type}:${item.id}`} item={item} />
|
|
))}
|
|
</div>
|
|
);
|
|
}
|