mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
added status and renamed components
This commit is contained in:
36
interface/src/framework/system/System.tsx
Normal file
36
interface/src/framework/system/System.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
import { Tab } from '@mui/material';
|
||||
import { Navigate, Routes, Route } from 'react-router-dom';
|
||||
import SystemLog from './SystemLog';
|
||||
import SystemStatus from './SystemStatus';
|
||||
import type { FC } from 'react';
|
||||
|
||||
import { useRouterTab, RouterTabs, useLayoutTitle } from 'components';
|
||||
|
||||
import { useI18nContext } from 'i18n/i18n-react';
|
||||
import SystemActivity from 'project/SystemActivity';
|
||||
|
||||
const System: FC = () => {
|
||||
const { LL } = useI18nContext();
|
||||
|
||||
useLayoutTitle(LL.SYSTEM(0));
|
||||
|
||||
const { routerTab } = useRouterTab();
|
||||
|
||||
return (
|
||||
<>
|
||||
<RouterTabs value={routerTab}>
|
||||
<Tab value="status" label={LL.STATUS_OF('')} />
|
||||
<Tab value="activity" label={LL.ACTIVITY()} />
|
||||
<Tab value="log" label={LL.LOG_OF('')} />
|
||||
</RouterTabs>
|
||||
<Routes>
|
||||
<Route path="status" element={<SystemStatus />} />
|
||||
<Route path="activity" element={<SystemActivity />} />
|
||||
<Route path="log" element={<SystemLog />} />
|
||||
<Route path="*" element={<Navigate replace to="status" />} />
|
||||
</Routes>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default System;
|
||||
Reference in New Issue
Block a user