Commit be22e94a authored by Chunchi Che's avatar Chunchi Che

fix extra deck

parent 421c3731
/* eslint valtio/avoid-this-in-proxy: 0 */ /* eslint valtio/avoid-this-in-proxy: 0 */
import { Omit } from "@react-spring/web"; import { Omit } from "@react-spring/web";
import { proxy } from "valtio";
import _ from "lodash"; import _ from "lodash";
import { proxy } from "valtio";
import { ygopro } from "@/api"; import { ygopro } from "@/api";
import type { InitInfo, MatState } from "./types"; import type { InitInfo, MatState } from "./types";
......
...@@ -19,6 +19,7 @@ import { ...@@ -19,6 +19,7 @@ import {
Space, Space,
Upload, Upload,
} from "antd"; } from "antd";
import { clone } from "lodash-es";
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { useNavigate, useParams } from "react-router-dom"; import { useNavigate, useParams } from "react-router-dom";
import rustInit from "rust-src"; import rustInit from "rust-src";
...@@ -142,7 +143,7 @@ const WaitRoom = () => { ...@@ -142,7 +143,7 @@ const WaitRoom = () => {
sendUpdateDeck(deck); sendUpdateDeck(deck);
setChoseDeck(true); setChoseDeck(true);
window.myExtraDeckCodes = deck.extra; window.myExtraDeckCodes = clone(deck.extra);
}; };
const handleChoseDeck = async (deckName: string) => { const handleChoseDeck = async (deckName: string) => {
......
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