diff --git a/package.json b/package.json index 7b3f8180f..02c08a3ba 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": ".", diff --git a/src/presentation/webapp/WebApp.tsx b/src/presentation/webapp/WebApp.tsx index 6df030d47..ed6596318 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 (