From 706b1a1cfb518b85eb5271f3e25a27dd4bd3a804 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 19 Aug 2023 14:21:05 -0700 Subject: Fix app version --- modern/.env | 3 +-- modern/src/settings/PreferencesPage.jsx | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modern/.env b/modern/.env index cb3c347e..410670a6 100644 --- a/modern/.env +++ b/modern/.env @@ -1,2 +1 @@ -ESLINT_NO_DEV_ERRORS=false -REACT_APP_VERSION=$npm_package_version +VITE_APP_VERSION=$npm_package_version diff --git a/modern/src/settings/PreferencesPage.jsx b/modern/src/settings/PreferencesPage.jsx index a05924a9..b83e7095 100644 --- a/modern/src/settings/PreferencesPage.jsx +++ b/modern/src/settings/PreferencesPage.jsx @@ -65,7 +65,7 @@ const PreferencesPage = () => { const user = useSelector((state) => state.session.user); const [attributes, setAttributes] = useState(user.attributes); - const versionApp = process.env.REACT_APP_VERSION.slice(0, -2); + const versionApp = import.meta.env.VITE_APP_VERSION.slice(0, -2); const versionServer = useSelector((state) => state.session.server.version); const socket = useSelector((state) => state.session.socket); -- cgit v1.2.3