From d02d0b6b5055ac7727eb534b2c8aa80174621a4b Mon Sep 17 00:00:00 2001 From: Gang Li Date: Thu, 30 Nov 2023 15:45:01 +0800 Subject: [PATCH] Fix a issue for react hooks rule fixing --- .../webui/src/app/components/content/remote/RemoteEdit.jsx | 4 +++- src/main/webui/src/server/app.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/webui/src/app/components/content/remote/RemoteEdit.jsx b/src/main/webui/src/app/components/content/remote/RemoteEdit.jsx index 46da52d..fa0a66d 100644 --- a/src/main/webui/src/app/components/content/remote/RemoteEdit.jsx +++ b/src/main/webui/src/app/components/content/remote/RemoteEdit.jsx @@ -117,7 +117,9 @@ export default function RemoteEdit() { } }, [pkgType, storeName, mode]); - store = state.store; + if (mode === 'edit'){ + store = state.store; + } const handleCheckChange = (event, field) => { if (event.target.checked) { diff --git a/src/main/webui/src/server/app.js b/src/main/webui/src/server/app.js index 81d57ae..8a426b0 100644 --- a/src/main/webui/src/server/app.js +++ b/src/main/webui/src/server/app.js @@ -1,3 +1,4 @@ +/* eslint-disable no-console */ import compression from 'compression'; import express from 'express'; import path from 'path';