fix: logo url get from the server

This commit is contained in:
chenos 2021-05-07 10:46:49 +08:00 committed by GitHub
parent cd5aee4c2a
commit 7f6dc49227
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,6 @@ import { history, Link, request, useModel } from 'umi';
import { UserOutlined, CodeOutlined, MenuOutlined } from '@ant-design/icons'; import { UserOutlined, CodeOutlined, MenuOutlined } from '@ant-design/icons';
import AvatarDropdown from '@/components/pages/AvatarDropdown'; import AvatarDropdown from '@/components/pages/AvatarDropdown';
import Menu from '@/components/menu'; import Menu from '@/components/menu';
import { ReactComponent as Logo } from './logo-white.svg';
import { useResponsive, useLocalStorageState } from 'ahooks'; import { useResponsive, useLocalStorageState } from 'ahooks';
import get from 'lodash/get'; import get from 'lodash/get';
@ -35,7 +34,7 @@ export function TopMenuLayout(props: any) {
className="nb-header" className="nb-header"
> >
<div className="logo" style={{ width: 200, height: 48, float: 'left' }}> <div className="logo" style={{ width: 200, height: 48, float: 'left' }}>
{!logoUrl ? <Logo /> : <img src={logoUrl} />} {logoUrl && <img src={logoUrl} />}
</div> </div>
{!isMobile && ( {!isMobile && (
<Menu <Menu