diff --git a/src/layouts/BasicLayout.tsx b/src/layouts/BasicLayout.tsx index 03d86f36c97710cfc81593e20296e0cb9e038e29..71ba6d4900c8a38510944bae4561884e23080a35 100644 --- a/src/layouts/BasicLayout.tsx +++ b/src/layouts/BasicLayout.tsx @@ -11,6 +11,7 @@ import React, { useState } from 'react'; import logo from '../assets/logo.svg'; import Authorized from '@/utils/Authorized'; import { formatMessage } from 'umi-plugin-react/locale'; +import { isAntDesignProOrDev } from '@/utils/utils'; import { BasicLayout as ProLayoutComponents, BasicLayoutProps as ProLayoutComponentsProps, @@ -40,6 +41,30 @@ const menuDataRender = (menuList: MenuDataItem[]): MenuDataItem[] => { }); }; +const footerRender: BasicLayoutProps['footerRender'] = (_, defaultDom) => { + if (!isAntDesignProOrDev()) { + return defaultDom; + } + return ( + <> + {defaultDom} +
+ + netlify logo + +
+ + ); +}; + const BasicLayout: React.FC = props => { const { dispatch, children, settings } = props; /** @@ -86,6 +111,7 @@ const BasicLayout: React.FC = props => { ...routers, ]; }} + footerRender={footerRender} menuDataRender={menuDataRender} formatMessage={formatMessage} rightContentRender={rightProps => }