Przeglądaj źródła

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

Leskur 6 lat temu
rodzic
commit
c647b001c0

+ 2 - 6
src/components/GlobalHeader/RightContent.tsx

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

+ 1 - 1
src/layouts/SecurityLayout.tsx

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