chore(maps): update banzone display when alarm

This commit is contained in:
Tran Anh Tuan
2025-09-29 21:11:51 +07:00
parent ef353862e4
commit b44f1a9b29
11 changed files with 386 additions and 20 deletions

View File

@@ -1,8 +1,9 @@
import { LogoutOutlined } from '@ant-design/icons';
import { history, RunTimeLayoutConfig } from '@umijs/max';
import { Dropdown } from 'antd';
import { handleRequestConfig } from '../config/Request';
import logo from '../public/logo.png';
import UnAccessPage from './components/403/403Page';
import Footer from './components/Footer/Footer';
import { ROUTE_LOGIN } from './constants';
import { parseJwt } from './utils/jwtTokenUtils';
import { getToken, removeToken } from './utils/localStorageUtils';
@@ -72,12 +73,37 @@ export const layout: RunTimeLayoutConfig = (initialState) => {
margin: 0,
paddingInline: 0,
},
avatarProps: {
size: 'small',
src: '/avatar.svg', // 👈 ở đây dùng icon thay vì src
render: (_, dom) => {
return (
<Dropdown
menu={{
items: [
{
key: 'logout',
icon: <LogoutOutlined />,
label: 'Đăng xuất',
onClick: () => {
removeToken();
history.push(ROUTE_LOGIN);
},
},
],
}}
>
{dom}
</Dropdown>
);
},
},
layout: 'mix',
logout: () => {
removeToken();
history.push(ROUTE_LOGIN);
},
footerRender: () => <Footer />,
// footerRender: () => <Footer />,
onPageChange: () => {
if (!initialState.initialState) {
history.push(ROUTE_LOGIN);