update frontend

This commit is contained in:
felinae98
2022-09-24 00:34:31 +08:00
parent 05244c4a66
commit 9ec4973fc3
4 changed files with 211 additions and 12 deletions
+1
View File
@@ -7,6 +7,7 @@ import App from './App';
import { persistor, store } from './app/store';
import './index.css';
import reportWebVitals from './reportWebVitals';
import '@arco-design/web-react/dist/css/arco.css';
const container = document.getElementById('root')!;
const root = createRoot(container);
+39 -7
View File
@@ -1,12 +1,44 @@
import React from 'react';
// import SubscribeManager from '../features/subsribeConfigManager/SubscribeManager';
import WeightManager from '../features/weightConfig/WeightManager';
import React, { ReactNode, useState } from 'react';
import { Breadcrumb, Layout, Menu } from '@arco-design/web-react';
import { IconRobot, IconDashboard } from '@arco-design/web-react/icon';
export default function Home() {
const [selectedTab, changeSelectTab] = useState('1');
let breadcrumbContent: ReactNode;
if (selectedTab === '1') {
breadcrumbContent = (
<Breadcrumb.Item>
<IconRobot />
</Breadcrumb.Item>
);
}
// let content: ReactNode;
return (
<>
<div>hoem</div>
<WeightManager />
</>
<Layout style={{ height: '100vh' }}>
<Layout.Header>
heade
</Layout.Header>
<Layout>
<Layout.Sider>
<Menu defaultSelectedKeys={['1']} onClickMenuItem={(key) => { changeSelectTab(key); }}>
<Menu.Item key="1">
<IconRobot />
</Menu.Item>
<Menu.Item key="2">
<IconDashboard />
</Menu.Item>
</Menu>
</Layout.Sider>
<Layout.Content style={{ padding: '0 24px' }}>
<Breadcrumb style={{ margin: '16px 0' }}>
{ breadcrumbContent }
</Breadcrumb>
<div>123</div>
</Layout.Content>
</Layout>
</Layout>
);
}