add list page and multiples optis
All checks were successful
Deploy Sokko G / deploy (push) Successful in 7s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 7s
This commit is contained in:
parent
d9d22683dc
commit
959fa42454
30 changed files with 1015 additions and 45 deletions
22
website/src/features/games/mhwilds/MhwildsLists.jsx
Normal file
22
website/src/features/games/mhwilds/MhwildsLists.jsx
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { useMemo, useState } from "react";
|
||||
import { GameListsPage } from "../GameListsPage.jsx";
|
||||
|
||||
export function MhwildsLists({ game, mhwilds, linkedToolboxId, actions }) {
|
||||
const lists = mhwilds.lists || [];
|
||||
const [selectedListId, setSelectedListId] = useState("");
|
||||
const selectedList = useMemo(
|
||||
() => lists.find((list) => list.id === selectedListId) || lists[0] || null,
|
||||
[lists, selectedListId]
|
||||
);
|
||||
|
||||
return (
|
||||
<GameListsPage
|
||||
game={game}
|
||||
lists={lists}
|
||||
selectedListId={selectedList?.id || ""}
|
||||
onSelectList={setSelectedListId}
|
||||
linkedToolboxId={linkedToolboxId}
|
||||
onCreateChecklist={(list) => actions.createChecklistFromList(game.id, list)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue