Commit 02505ee4 authored by Chunchi Che's avatar Chunchi Che

fix

parent 38e4fcfc
Pipeline #21053 passed with stages
in 18 minutes and 57 seconds
import { ygopro } from "../../api/ocgcore/idl/ocgcore";
import { setSortCardModalIsOpen } from "../../reducers/duel/mod";
import { fetchSortCardMeta } from "../../reducers/duel/modal/sortCardModalSlice";
import { AppDispatch } from "../../store";
import MsgSortCard = ygopro.StocGameMessage.MsgSortCard;
......@@ -7,4 +8,5 @@ export default (sortCard: MsgSortCard, dispatch: AppDispatch) => {
for (const option of sortCard.options) {
dispatch(fetchSortCardMeta(option.toObject()));
}
dispatch(setSortCardModalIsOpen(true));
};
import React, { useRef, useState } from "react";
import React, { useEffect, useRef, useState } from "react";
import {
DndContext,
closestCenter,
......@@ -57,7 +57,10 @@ const SortCardModal = () => {
}
};
console.log(items);
useEffect(() => {
setItems(options);
}, [options]);
return (
<DragModal
modalProps={{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment