pierrejeambrun commented on code in PR #46558:
URL: https://github.com/apache/airflow/pull/46558#discussion_r1946839456


##########
airflow/ui/src/layouts/BaseLayout.tsx:
##########
@@ -35,6 +38,19 @@ export const BaseLayout = ({ children }: PropsWithChildren) 
=> {
     document.title = instanceName;
   }
 
+  const [searchParams, setSearchParams] = useSearchParams();
+  const paramToken = searchParams.get("token");
+
+  const [, setToken] = useLocalStorage<string | null>(TOKEN_STORAGE_KEY, 
paramToken);
+
+  useEffect(() => {

Review Comment:
   I tried working around removing that useEffect. Without success. (call to 
the hooks will still need to be wrapped in the useEffect, raises a warning 
otherwise in the attempt I made



##########
airflow/ui/src/layouts/BaseLayout.tsx:
##########
@@ -35,6 +38,19 @@ export const BaseLayout = ({ children }: PropsWithChildren) 
=> {
     document.title = instanceName;
   }
 
+  const [searchParams, setSearchParams] = useSearchParams();
+  const paramToken = searchParams.get("token");

Review Comment:
   We can, but the storage key and the query_param name are two distinct 
things, I'll extract another constant from there so it doesn't get confusing.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to