pierrejeambrun commented on code in PR #62172:
URL: https://github.com/apache/airflow/pull/62172#discussion_r2828253188
##########
airflow-core/src/airflow/ui/src/layouts/Nav/Nav.tsx:
##########
@@ -157,27 +168,35 @@ export const Nav = () => {
<Flex alignItems="center" flexDir="column" gap={1} width="100%">
<Box alignItems="center" asChild boxSize={14} display="flex"
justifyContent="center">
<Link title={translate("nav.home")} to="/">
- <AirflowPin
- _motionSafe={{
- _hover: {
- transform: "rotate(360deg)",
- transition: "transform 0.8s ease-in-out",
- },
- }}
- boxSize={8}
- />
+ {hasIconSrc && colorMode && !failedLoadingCustomIcon[colorMode] ? (
+ // eslint-disable-next-line
jsx-a11y/no-noninteractive-element-interactions
+ <img
+ alt="Airflow"
+ onError={() => setFailedLoadingCustomIcon((prev) => ({
...prev, [colorMode]: true }))}
Review Comment:
Eslint is not happy with an even listener on an non interactive element, but
I couldn't find another easy option to handle the image loading failure in
React. (most things I read point to this...)
--
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]