Browse Source

bugfix: fix SecurityLayout error (ant-design#5640) (#5956)

pull/5966/head
Leskur 6 years ago
committed by GitHub
parent
commit
c647b001c0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      src/components/GlobalHeader/RightContent.tsx
  2. 2
      src/layouts/SecurityLayout.tsx

8
src/components/GlobalHeader/RightContent.tsx

@ -48,12 +48,8 @@ const GlobalHeaderRight: React.SFC<GlobalHeaderRightProps> = props => {
id: 'component.globalHeader.search.example3',
}),
]}
onSearch={value => {
console.log('input', value);
}}
onPressEnter={value => {
console.log('enter', value);
}}
onSearch={() => {}}
onPressEnter={() => {}}
/>
<Tooltip
title={formatMessage({

2
src/layouts/SecurityLayout.tsx

@ -45,7 +45,7 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
if ((!isLogin && loading) || !isReady) {
return <PageLoading />;
}
if (!isLogin) {
if (!isLogin && window.location.pathname !== '/user/login') {
return <Redirect to={`/user/login?${queryString}`} />;
}
return children;

Loading…
Cancel
Save