Skip to content

Commit

Permalink
fix(animation): remove annoying image animation (#1969)
Browse files Browse the repository at this point in the history
  • Loading branch information
S33G committed Apr 3, 2024
1 parent 03f1c80 commit d27a7ce
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
3 changes: 1 addition & 2 deletions src/components/device-image/DeviceImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { Suspense } from 'react';
import genericDevice from '../../images/generic-zigbee-device.png';
import { Device, DeviceState, OTAState } from '../../types';
import cx from 'classnames';
import style from './style.module.css';
import { useTranslation } from 'react-i18next';
import { LazyImage } from './LazyImage';
import { ErrorBoundary } from './ErrorBoundary';
Expand Down Expand Up @@ -44,7 +43,7 @@ export function DeviceImage(props: Readonly<DeviceImageProps>) {

return (
<div className={cx(className, 'position-relative')} {...rest}>
<Suspense fallback={<img alt="" src={genericDevice} className={style.img} />}>
<Suspense fallback={<img alt="" src={genericDevice} />}>
<ErrorBoundary>
<LazyImage device={device} />
</ErrorBoundary>
Expand Down
3 changes: 1 addition & 2 deletions src/components/device-image/LazyImage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import style from './style.module.css';
import { useImage } from 'react-image';
import { AVAILABLE_GENERATORS } from '.';
import { Device } from '../../types';
Expand All @@ -18,5 +17,5 @@ export function LazyImage(props: Readonly<LazyImageProps>) {
if (type === 'svg') {
return <image crossOrigin={'anonymous'} {...rest} href={src} />;
}
return <img alt="" crossOrigin={'anonymous'} src={src} className={style.img} />;
return <img alt="" crossOrigin={'anonymous'} src={src} />;
}
11 changes: 0 additions & 11 deletions src/components/device-image/style.module.css

This file was deleted.

0 comments on commit d27a7ce

Please sign in to comment.