Commit 6eb7139a authored by ι™ˆεΈ…'s avatar ι™ˆεΈ…

add netlify logo in footer

parent 34c74a05
...@@ -11,6 +11,7 @@ import React, { useState } from 'react'; ...@@ -11,6 +11,7 @@ import React, { useState } from 'react';
import logo from '../assets/logo.svg'; import logo from '../assets/logo.svg';
import Authorized from '@/utils/Authorized'; import Authorized from '@/utils/Authorized';
import { formatMessage } from 'umi-plugin-react/locale'; import { formatMessage } from 'umi-plugin-react/locale';
import { isAntDesignProOrDev } from '@/utils/utils';
import { import {
BasicLayout as ProLayoutComponents, BasicLayout as ProLayoutComponents,
BasicLayoutProps as ProLayoutComponentsProps, BasicLayoutProps as ProLayoutComponentsProps,
...@@ -40,6 +41,30 @@ const menuDataRender = (menuList: MenuDataItem[]): MenuDataItem[] => { ...@@ -40,6 +41,30 @@ const menuDataRender = (menuList: MenuDataItem[]): MenuDataItem[] => {
}); });
}; };
const footerRender: BasicLayoutProps['footerRender'] = (_, defaultDom) => {
if (!isAntDesignProOrDev()) {
return defaultDom;
}
return (
<>
{defaultDom}
<div
style={{
textAlign: 'center',
padding: '0px 20px 20px',
}}
>
<a href="https://www.netlify.com">
<img
src="https://www.netlify.com/img/global/badges/netlify-dark.svg"
alt="netlify logo"
/>
</a>
</div>
</>
);
};
const BasicLayout: React.FC<BasicLayoutProps> = props => { const BasicLayout: React.FC<BasicLayoutProps> = props => {
const { dispatch, children, settings } = props; const { dispatch, children, settings } = props;
/** /**
...@@ -86,6 +111,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = props => { ...@@ -86,6 +111,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = props => {
...routers, ...routers,
]; ];
}} }}
footerRender={footerRender}
menuDataRender={menuDataRender} menuDataRender={menuDataRender}
formatMessage={formatMessage} formatMessage={formatMessage}
rightContentRender={rightProps => <RightContent {...rightProps} />} rightContentRender={rightProps => <RightContent {...rightProps} />}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment