bbovenzi commented on code in PR #64404:
URL: https://github.com/apache/airflow/pull/64404#discussion_r3041007139
##########
airflow-core/src/airflow/ui/src/pages/TaskInstance/ExtraLinks.tsx:
##########
@@ -47,10 +57,10 @@ export const ExtraLinks = ({ refetchInterval }:
ExtraLinksProps) => {
<Box py={1}>
<Heading size="sm">{translate("extraLinks")}</Heading>
<HStack gap={2} py={2}>
- {Object.entries(data.extra_links).map(([key, value], _) =>
- value === null ? undefined : (
+ {Object.entries(data.extra_links).map(([key, url]) =>
+ url === null ? undefined : (
<Button asChild colorPalette="brand" key={key} variant="surface">
- <a href={value} rel="noopener noreferrer" target="_blank">
+ <a href={url} rel="noopener noreferrer" target={getTarget(url)}>
Review Comment:
One last nit, I prefer if we don't call the function inline. Since it would
create the function new on every render.
Instead, before the `return` line. We should have `const target =
getTarget(url)` and then call `target={target}` on this line
--
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]