From 6c8cb65ac2c2f90081a9d7ae33c0cd005462482b Mon Sep 17 00:00:00 2001 From: "Arthur E. Jones" Date: Fri, 1 Jul 2022 15:19:28 -0500 Subject: [PATCH] refactor: extract Version component --- .../desktop-client/src/components/Settings.js | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/packages/desktop-client/src/components/Settings.js b/packages/desktop-client/src/components/Settings.js index 44b7f01..11aa949 100644 --- a/packages/desktop-client/src/components/Settings.js +++ b/packages/desktop-client/src/components/Settings.js @@ -24,8 +24,6 @@ import ExpandArrow from 'loot-design/src/svg/ExpandArrow'; import ExclamationSolid from 'loot-design/src/svg/v1/ExclamationSolid'; import Platform from 'loot-core/src/client/platform'; -import { version } from '../../package.json' - let dateFormats = [ { value: 'MM/dd/yyyy', label: 'MM/DD/YYYY' }, { value: 'dd/MM/yyyy', label: 'DD/MM/YYYY' }, @@ -475,6 +473,25 @@ function SettingsLink({ to, name, style, first, last }) { ); } +function Version() { + return ( + + v{window.Actual.ACTUAL_VERSION} + + ); +} + class Settings extends React.Component { componentDidMount() { this.unlisten = listen('prefs-updated', () => { @@ -503,15 +520,7 @@ class Settings extends React.Component { > - v{ version } +