diff --git a/packages/api/package-lock.json b/packages/api/package-lock.json index 6ed6624603..861e486164 100644 --- a/packages/api/package-lock.json +++ b/packages/api/package-lock.json @@ -1,12 +1,12 @@ { "name": "litefarm-api", - "version": "3.6.0", + "version": "3.6.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "litefarm-api", - "version": "3.6.0", + "version": "3.6.1", "dependencies": { "@aws-sdk/client-s3": "^3.456.0", "@googlemaps/google-maps-services-js": "^3.3.14", diff --git a/packages/api/package.json b/packages/api/package.json index 04bd74d1ab..8f1c99626e 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "litefarm-api", - "version": "3.6.0", + "version": "3.6.1", "description": "LiteFarm API server", "main": "./api/src/server.js", "type": "module", diff --git a/packages/api/src/server.js b/packages/api/src/server.js index b1e22d58ff..4781ecf576 100644 --- a/packages/api/src/server.js +++ b/packages/api/src/server.js @@ -39,7 +39,7 @@ if (process.env.SENTRY_DSN && environment !== 'development') { // Automatically instrument Node.js libraries and frameworks ...Sentry.autoDiscoverNodePerformanceMonitoringIntegrations(), ], - release: '3.5.2', + release: '3.6.1', // Set tracesSampleRate to 1.0 to capture 100% // of transactions for performance monitoring. // We recommend adjusting this value in production diff --git a/packages/webapp/package.json b/packages/webapp/package.json index 6529a0a0b8..0cd3cb3120 100644 --- a/packages/webapp/package.json +++ b/packages/webapp/package.json @@ -1,6 +1,6 @@ { "name": "litefarm-webapp", - "version": "3.6.0", + "version": "3.6.1", "description": "LiteFarm Web application", "type": "module", "scripts": { diff --git a/packages/webapp/src/containers/Navigation/index.jsx b/packages/webapp/src/containers/Navigation/index.jsx index d09585e553..83cbc88105 100644 --- a/packages/webapp/src/containers/Navigation/index.jsx +++ b/packages/webapp/src/containers/Navigation/index.jsx @@ -18,19 +18,23 @@ import PureNavigation from '../../components/Navigation'; import { showedSpotlightSelector } from '../showedSpotlightSlice'; import { setSpotlightToShown } from '../Map/saga'; import useIsFarmSelected from '../../hooks/useIsFarmSelected'; -import { CUSTOM_SIGN_UP } from '../CustomSignUp/constants'; -import useHistoryLocation from '../hooks/useHistoryLocation'; +import { + CREATE_USER_ACCOUNT, + CUSTOM_SIGN_UP, + ENTER_PASSWORD_PAGE, +} from '../CustomSignUp/constants'; import ReleaseBadgeHandler from '../ReleaseBadgeHandler'; const Navigation = ({ history, children, ...props }) => { const dispatch = useDispatch(); - const historyLocation = useHistoryLocation(history); - const isCustomSignupPage = historyLocation.state?.component === CUSTOM_SIGN_UP; const isFarmSelected = useIsFarmSelected(); const { navigation, notification } = useSelector(showedSpotlightSelector); const resetSpotlight = () => { dispatch(setSpotlightToShown(['notification', 'navigation'])); }; + const hideNavBar = [CUSTOM_SIGN_UP, ENTER_PASSWORD_PAGE, CREATE_USER_ACCOUNT].includes( + history.location?.state?.component, + ); return ( <> @@ -40,7 +44,7 @@ const Navigation = ({ history, children, ...props }) => { resetSpotlight={resetSpotlight} history={history} isFarmSelected={isFarmSelected} - hidden={isCustomSignupPage} + hidden={hideNavBar} {...props} > {children} diff --git a/packages/webapp/src/containers/hooks/useHistoryLocation.js b/packages/webapp/src/containers/hooks/useHistoryLocation.js deleted file mode 100644 index 405c3c8a78..0000000000 --- a/packages/webapp/src/containers/hooks/useHistoryLocation.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2023 LiteFarm.org - * This file is part of LiteFarm. - * - * LiteFarm is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * LiteFarm is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details, see . - */ -import { useLayoutEffect, useState } from 'react'; - -function useHistoryLocation(history) { - const [historyLocation, setHistoryLocation] = useState(history.location); - - // Set up a listener to update the historyLocation state synchronously - // after DOM mutations, ensuring immediate processing of history events. - useLayoutEffect(() => { - const unlisten = history.listen(({ location }) => { - setHistoryLocation(location); - }); - return () => unlisten(); - }, [history]); - - return historyLocation; -} - -export default useHistoryLocation; diff --git a/packages/webapp/src/main.jsx b/packages/webapp/src/main.jsx index 83b1f97af5..64b082078e 100644 --- a/packages/webapp/src/main.jsx +++ b/packages/webapp/src/main.jsx @@ -86,7 +86,7 @@ if (import.meta.env.VITE_SENTRY_DSN) { Sentry.init({ dsn: import.meta.env.VITE_SENTRY_DSN, integrations: [new Integrations.BrowserTracing()], - release: '3.6.0', + release: '3.6.1', // Set tracesSampleRate to 1.0 to capture 100% // of transactions for performance monitoring. // We recommend adjusting this value in production