| @@ -1,15 +1,15 @@ | |||||
| import { useDraggable } from '@/hooks/useDraggable'; | |||||
| // import { useDraggable } from '@/hooks/useDraggable'; | |||||
| import { getWorkspaceOverviewReq } from '@/services/workspace'; | import { getWorkspaceOverviewReq } from '@/services/workspace'; | ||||
| import { ExperimentInstance } from '@/types'; | import { ExperimentInstance } from '@/types'; | ||||
| import { to } from '@/utils/promise'; | import { to } from '@/utils/promise'; | ||||
| import { Divider, Flex } from 'antd'; | import { Divider, Flex } from 'antd'; | ||||
| import { useEffect, useState } from 'react'; | import { useEffect, useState } from 'react'; | ||||
| import Draggable from 'react-draggable'; | |||||
| // import Draggable from 'react-draggable'; | |||||
| import AssetsManagement from './components/AssetsManagement'; | import AssetsManagement from './components/AssetsManagement'; | ||||
| import ExperimentChart, { type ExperimentStatistics } from './components/ExperimentChart'; | import ExperimentChart, { type ExperimentStatistics } from './components/ExperimentChart'; | ||||
| import ExperitableTable from './components/ExperimentTable'; | import ExperitableTable from './components/ExperimentTable'; | ||||
| import QuickStart from './components/QuickStart'; | import QuickStart from './components/QuickStart'; | ||||
| import RobotFrame from './components/RobotFrame'; | |||||
| // import RobotFrame from './components/RobotFrame'; | |||||
| import TotalStatistics from './components/TotalStatistics'; | import TotalStatistics from './components/TotalStatistics'; | ||||
| import UserPoints from './components/UserPoints'; | import UserPoints from './components/UserPoints'; | ||||
| import UserSpace from './components/UserSpace'; | import UserSpace from './components/UserSpace'; | ||||
| @@ -25,10 +25,10 @@ type OverviewData = { | |||||
| function Workspace() { | function Workspace() { | ||||
| const [overviewData, setOverviewData] = useState<OverviewData>(); | const [overviewData, setOverviewData] = useState<OverviewData>(); | ||||
| const [robotFrameVisible, setRobotFrameVisible] = useState(false); | |||||
| const { handleStart, handleStop, handleDrag, handleClick } = useDraggable(() => | |||||
| setRobotFrameVisible((prev) => !prev), | |||||
| ); | |||||
| // const [robotFrameVisible, setRobotFrameVisible] = useState(false); | |||||
| // const { handleStart, handleStop, handleDrag, handleClick } = useDraggable(() => | |||||
| // setRobotFrameVisible((prev) => !prev), | |||||
| // ); | |||||
| const users: number[] = new Array(8).fill(0); | const users: number[] = new Array(8).fill(0); | ||||
| useEffect(() => { | useEffect(() => { | ||||
| @@ -85,7 +85,7 @@ function Workspace() { | |||||
| <AssetsManagement></AssetsManagement> | <AssetsManagement></AssetsManagement> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <Draggable onStart={handleStart} onStop={handleStop} onDrag={handleDrag} bounds="body"> | |||||
| {/* <Draggable onStart={handleStart} onStop={handleStop} onDrag={handleDrag} bounds="body"> | |||||
| <img | <img | ||||
| className={styles['workspace__robot-img']} | className={styles['workspace__robot-img']} | ||||
| src={require('@/assets/img/robot.png')} | src={require('@/assets/img/robot.png')} | ||||
| @@ -98,7 +98,7 @@ function Workspace() { | |||||
| <RobotFrame | <RobotFrame | ||||
| visible={robotFrameVisible} | visible={robotFrameVisible} | ||||
| onClose={() => setRobotFrameVisible(false)} | onClose={() => setRobotFrameVisible(false)} | ||||
| ></RobotFrame> | |||||
| ></RobotFrame> */} | |||||
| </div> | </div> | ||||
| ); | ); | ||||
| } | } | ||||