Browse Source

fix login page Error

Signed-off-by: ryjiang <jiangruiyi@gmail.com>
ryjiang 1 year ago
parent
commit
af5bef6364
1 changed files with 2 additions and 2 deletions
  1. 2 2
      client/src/context/Auth.tsx

+ 2 - 2
client/src/context/Auth.tsx

@@ -1,5 +1,5 @@
 import { createContext, useEffect, useState } from 'react';
-import { MILVUS_CLIENT_ID, LAST_TIME_ADDRESS, LOGIN_USERNAME } from '@/consts';
+import { MILVUS_CLIENT_ID, LOGIN_USERNAME } from '@/consts';
 import { AuthContextType } from './Types';
 
 export const authContext = createContext<AuthContextType>({
@@ -19,7 +19,7 @@ const { Provider } = authContext;
 export const AuthProvider = (props: { children: React.ReactNode }) => {
   // get milvus address from local storage
   const [address, setAddress] = useState<string>(
-    window.localStorage.getItem(LAST_TIME_ADDRESS) || ''
+    window.localStorage.getItem(MILVUS_CLIENT_ID) || ''
   );
   // get login username from local storage
   const [username, setUsername] = useState<string>(