From 8490487b7fed025c2cf4234ebad19b0c7fafa8e6 Mon Sep 17 00:00:00 2001 From: Eduardo Peredo Rivero Date: Fri, 7 Jun 2024 07:50:21 -0500 Subject: [PATCH 1/2] avoid reloading app after loading feedback component --- src/presentation/webapp/WebApp.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/presentation/webapp/WebApp.tsx b/src/presentation/webapp/WebApp.tsx index 6df030d4..ed659631 100644 --- a/src/presentation/webapp/WebApp.tsx +++ b/src/presentation/webapp/WebApp.tsx @@ -5,7 +5,6 @@ import { LoadingProvider, SnackbarProvider } from "@eyeseetea/d2-ui-components"; import { MuiThemeProvider } from "@material-ui/core/styles"; import { createGenerateClassName, StylesProvider } from "@material-ui/styles"; import { init } from "d2"; -import _ from "lodash"; //@ts-ignore import OldMuiThemeProvider from "material-ui/styles/MuiThemeProvider"; import { useEffect, useState } from "react"; @@ -33,7 +32,6 @@ const App = () => { const { baseUrl } = useConfig(); const [appContext, setAppContext] = useState(null); const [username, setUsername] = useState(""); - const [showShareButton, setShowShareButton] = useState(false); const [appConfig, setAppConfig] = useState>(); const migrations = useMigrations(appContext); @@ -63,14 +61,15 @@ const App = () => { setAppContext({ d2: d2 as object, api, compositionRoot }); Object.assign(window, { d2, api }); - setShowShareButton(_(appConfig).get("appearance.showShareButton") || false); setUsername(currentUser.username); setAppConfig(configFromJson); await initializeAppRoles(baseUrl); }; run(); - }, [appConfig, baseUrl]); + }, [baseUrl]); + + const showShareButton = appConfig?.appearance.showShareButton || false; if (migrations.state.type === "pending") { return ( From 437c8ef6880af508c6776707bc9e79e1c36ac57a Mon Sep 17 00:00:00 2001 From: Miquel Adell Date: Fri, 7 Jun 2024 15:14:03 +0200 Subject: [PATCH 2/2] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7b3f8180..02c08a3b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "metadata-synchronization", "description": "Advanced metadata & data synchronization utility", - "version": "2.18.1", + "version": "2.18.2", "license": "GPL-3.0", "author": "EyeSeeTea team", "homepage": ".",