From 7af47a92c7c611bacf55a24d2c7bcb182e8901f9 Mon Sep 17 00:00:00 2001 From: Carter Date: Tue, 18 Mar 2025 14:58:56 -0600 Subject: [PATCH] using img instead of react-image to prevent unmounted component error --- package-lock.json | 10 ---------- package.json | 1 - src/common/ImgIcon.tsx | 3 +-- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index ea8334c..6049cfe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,7 +39,6 @@ "react-error-boundary": "^5.0.0", "react-full-screen": "^1.1.1", "react-horizontal-scrolling-menu": "^7.1.1", - "react-image": "^4.1.0", "react-infinite-scroller": "^1.2.6", "react-joyride": "^2.9.3", "react-map-gl": "^8.0.1", @@ -10028,15 +10027,6 @@ "react-dom": ">=16.8" } }, - "node_modules/react-image": { - "version": "4.1.0", - "integrity": "sha512-qwPNlelQe9Zy14K2pGWSwoL+vHsAwmJKS6gkotekDgRpcnRuzXNap00GfibD3eEPYu3WCPlyIUUNzcyHOrLHjw==", - "peerDependencies": { - "@babel/runtime": ">=7", - "react": ">=16.8", - "react-dom": ">=16.8" - } - }, "node_modules/react-infinite-scroller": { "version": "1.2.6", "integrity": "sha512-mGdMyOD00YArJ1S1F3TVU9y4fGSfVVl6p5gh/Vt4u99CJOptfVu/q5V/Wlle72TMgYlBwIhbxK5wF0C/R33PXQ==", diff --git a/package.json b/package.json index e0f2626..872e9c4 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,6 @@ "react-error-boundary": "^5.0.0", "react-full-screen": "^1.1.1", "react-horizontal-scrolling-menu": "^7.1.1", - "react-image": "^4.1.0", "react-infinite-scroller": "^1.2.6", "react-joyride": "^2.9.3", "react-map-gl": "^8.0.1", diff --git a/src/common/ImgIcon.tsx b/src/common/ImgIcon.tsx index 5134fa3..c5ebb3d 100644 --- a/src/common/ImgIcon.tsx +++ b/src/common/ImgIcon.tsx @@ -1,6 +1,5 @@ import { Icon } from "@mui/material"; import { makeStyles } from "@mui/styles"; -import { Img as Image } from "react-image"; const useStyles = makeStyles(() => ({ icon: { @@ -37,7 +36,7 @@ export function ImgIcon(props: Props) { className={classes.icon} style={{ height: iconHeight, width: iconWidth }} > -