Commit 7bd44047 authored by BBeretta's avatar BBeretta

feat/language-translation (merge conflicts don)

parent 4f345f56
...@@ -11,6 +11,7 @@ import { App, Button, Input, message, Space, Tooltip } from "antd"; ...@@ -11,6 +11,7 @@ import { App, Button, Input, message, Space, Tooltip } from "antd";
import { HTML5toTouch } from "rdndmb-html5-to-touch"; import { HTML5toTouch } from "rdndmb-html5-to-touch";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { DndProvider } from "react-dnd-multi-backend"; import { DndProvider } from "react-dnd-multi-backend";
import { useTranslation } from "react-i18next";
import { LoaderFunction } from "react-router-dom"; import { LoaderFunction } from "react-router-dom";
import { proxy, useSnapshot } from "valtio"; import { proxy, useSnapshot } from "valtio";
import { subscribeKey } from "valtio/utils"; import { subscribeKey } from "valtio/utils";
...@@ -39,7 +40,6 @@ import { ...@@ -39,7 +40,6 @@ import {
editingDeckToIDeck, editingDeckToIDeck,
iDeckToEditingDeck, iDeckToEditingDeck,
} from "./utils"; } from "./utils";
import { useTranslation } from "react-i18next";
export const loader: LoaderFunction = async () => { export const loader: LoaderFunction = async () => {
// 必须先加载卡组,不然页面会崩溃 // 必须先加载卡组,不然页面会崩溃
...@@ -329,4 +329,4 @@ const HigherCardDetail: React.FC = () => { ...@@ -329,4 +329,4 @@ const HigherCardDetail: React.FC = () => {
onClose={() => (selectedCard.open = false)} onClose={() => (selectedCard.open = false)}
/> />
); );
}; };
\ No newline at end of file
...@@ -17,7 +17,7 @@ const defaultProps = { isOpen: false, positions: [] }; ...@@ -17,7 +17,7 @@ const defaultProps = { isOpen: false, positions: [] };
const localStore = proxy<PositionModalProps>(defaultProps); const localStore = proxy<PositionModalProps>(defaultProps);
const language = localStorage.getItem("language"); const language = localStorage.getItem("language");
const title = language != "cn" ? "Please select a position" : "请选择表示形式"; const title = language !== "cn" ? "Please select a position" : "请选择表示形式";
export const PositionModal = () => { export const PositionModal = () => {
const { isOpen, positions } = useSnapshot(localStore); const { isOpen, positions } = useSnapshot(localStore);
......
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