diff --git a/src/pages/ProblemSetDetail/Settings/index.tsx b/src/pages/ProblemSetDetail/Settings/index.tsx index 80c5c2b..86fa8a5 100644 --- a/src/pages/ProblemSetDetail/Settings/index.tsx +++ b/src/pages/ProblemSetDetail/Settings/index.tsx @@ -1,10 +1,12 @@ +import { PlusOutlined } from '@ant-design/icons' import ProCard from '@ant-design/pro-card' import { useRequest } from 'ahooks' -import { Col, message, Row } from 'antd' +import { Button, Col, message, Row } from 'antd' import ShadowCard from 'components/ShadowCard' import type React from 'react' import { useState } from 'react' -import { useParams } from 'react-router-dom' +import { useTranslation } from 'react-i18next' +import { useNavigate, useParams } from 'react-router-dom' import type { ProTablePagination } from 'types' import { transPagination } from 'utils' import { DEFAULT_GUTTER } from 'utils/constants' @@ -14,10 +16,11 @@ import AddExistProblem from './AddExistProblem' import DraggableProblemTable from './DraggableProblemTable' const Index: React.FC = () => { + const { t } = useTranslation() const [tab, setTab] = useState('tab1') const { domainUrl, problemSetId } = useParams<{ domainUrl: string; problemSetId: string }>() - + const navigate = useNavigate() if (!domainUrl) { throw new NoDomainUrlError() } @@ -61,7 +64,19 @@ const Index: React.FC = () => { manual: true } ) - + const createNewProblem = ( +