From bb3d33733ec53802222b152bb74cae7fcb07f083 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Mon, 29 Jul 2019 10:34:20 -0400 Subject: [PATCH] fix web --- src/platforms/web/stubs.js | 1 + src/ui/index.jsx | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/platforms/web/stubs.js b/src/platforms/web/stubs.js index 2de68b7ac..74e8d3c52 100644 --- a/src/platforms/web/stubs.js +++ b/src/platforms/web/stubs.js @@ -9,6 +9,7 @@ export const remote = { getCurrentWindow: callable, app: { getAppPath: callable, + getLocale: () => 'en', }, BrowserWindow: { getFocusedWindow: callable, diff --git a/src/ui/index.jsx b/src/ui/index.jsx index e3df2096f..c7c62822a 100644 --- a/src/ui/index.jsx +++ b/src/ui/index.jsx @@ -3,10 +3,10 @@ import App from 'component/app'; import SnackBar from 'component/snackBar'; // @if TARGET='app' import SplashScreen from 'component/splash'; -import moment from 'moment'; -import { ipcRenderer, remote, shell } from 'electron'; import * as ACTIONS from 'constants/action_types'; // @endif +import { ipcRenderer, remote, shell } from 'electron'; +import moment from 'moment'; import * as MODALS from 'constants/modal_types'; import React, { useState, useEffect } from 'react'; import ReactDOM from 'react-dom'; @@ -202,6 +202,7 @@ function AppWrapper() { const [readyToLaunch, setReadyToLaunch] = useState(haveLaunched || IS_WEB); useEffect(() => { + // @if TARGET='app' moment.locale(remote.app.getLocale()); autoUpdater.on('error', error => { @@ -220,6 +221,7 @@ function AppWrapper() { app.store.dispatch(doAutoUpdate()); }); } + // @endif }, []); useEffect(() => {