chore: list state merge

This commit is contained in:
jialin
2024-08-09 10:26:46 +08:00
parent 77f38394e6
commit dea99ff70a
19 changed files with 246 additions and 96 deletions
+3 -4
View File
@@ -2,7 +2,7 @@ import { PageContainer } from '@ant-design/pro-components';
import { useIntl } from '@umijs/max';
import type { TabsProps } from 'antd';
import { Tabs } from 'antd';
import { useState } from 'react';
import { useCallback, useState } from 'react';
import GPUs from './components/gpus';
import Workers from './components/workers';
@@ -19,14 +19,13 @@ const items: TabsProps['items'] = [
}
];
const Resources = () => {
console.log('resources======');
const [activeKey, setActiveKey] = useState('workers');
const intl = useIntl();
const handleChangeTab = (key: string) => {
const handleChangeTab = useCallback((key: string) => {
setActiveKey(key);
};
}, []);
return (
<>