Commit 07adcdc5 authored by 陈帅's avatar 陈帅

fix cr warning

parent dc505305
...@@ -50,14 +50,14 @@ const footerRender: BasicLayoutProps['footerRender'] = (_, defaultDom) => { ...@@ -50,14 +50,14 @@ const footerRender: BasicLayoutProps['footerRender'] = (_, defaultDom) => {
{defaultDom} {defaultDom}
<div <div
style={{ style={{
textAlign: 'center',
padding: '0px 24px 24px', padding: '0px 24px 24px',
textAlign: 'center',
}} }}
> >
<a href="https://www.netlify.com" target="_blank"> <a href="https://www.netlify.com" target="_blank">
<img <img
src="https://www.netlify.com/img/global/badges/netlify-color-bg.svg" src="https://www.netlify.com/img/global/badges/netlify-color-bg.svg"
width={82} width="82px"
alt="netlify logo" alt="netlify logo"
/> />
</a> </a>
......
/* eslint no-useless-escape:0 import/prefer-default-export:0 */ /* eslint no-useless-escape:0 import/prefer-default-export:0 */
const reg = /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/; const reg = /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/;
export function isUrl(path: string) { const isUrl = (path: string): boolean => {
return reg.test(path); return reg.test(path);
} };
export function isAntDesignPro(): boolean { const isAntDesignPro = (): boolean => {
if (ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site') { if (ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site') {
return true; return true;
} }
return window.location.hostname === 'preview.pro.ant.design'; return window.location.hostname === 'preview.pro.ant.design';
} };
// 给官方演示站点用,用于关闭真实开发环境不需要使用的特性 // 给官方演示站点用,用于关闭真实开发环境不需要使用的特性
export function isAntDesignProOrDev(): boolean { const isAntDesignProOrDev = (): boolean => {
const { NODE_ENV } = process.env; const { NODE_ENV } = process.env;
if (NODE_ENV === 'development') { if (NODE_ENV === 'development') {
return true; return true;
} }
return isAntDesignPro(); return isAntDesignPro();
} };
export { isAntDesignProOrDev, isAntDesignPro, isUrl };
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