summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer/components
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/renderer/components')
-rw-r--r--gui/src/renderer/components/Account.tsx5
-rw-r--r--gui/src/renderer/components/Settings.tsx9
2 files changed, 14 insertions, 0 deletions
diff --git a/gui/src/renderer/components/Account.tsx b/gui/src/renderer/components/Account.tsx
index 18980ca1a9..02e2b9f081 100644
--- a/gui/src/renderer/components/Account.tsx
+++ b/gui/src/renderer/components/Account.tsx
@@ -31,9 +31,14 @@ interface IProps {
onLogout: () => void;
onClose: () => void;
onBuyMore: () => Promise<void>;
+ updateAccountData: () => void;
}
export default class Account extends React.Component<IProps> {
+ public componentDidMount() {
+ this.props.updateAccountData();
+ }
+
public render() {
return (
<ModalContainer>
diff --git a/gui/src/renderer/components/Settings.tsx b/gui/src/renderer/components/Settings.tsx
index 56b8fd5494..1610f776f9 100644
--- a/gui/src/renderer/components/Settings.tsx
+++ b/gui/src/renderer/components/Settings.tsx
@@ -2,6 +2,7 @@ import * as React from 'react';
import { colors, links } from '../../config.json';
import { hasExpired, formatRemainingTime } from '../../shared/account-expiry';
import { messages } from '../../shared/gettext';
+import History from '../lib/history';
import { AriaDescribed, AriaDescription, AriaDescriptionGroup } from './AriaGroup';
import * as Cell from './cell';
import { Layout } from './Layout';
@@ -42,9 +43,17 @@ export interface IProps {
onViewPreferences: () => void;
onViewAdvancedSettings: () => void;
onExternalLink: (url: string) => void;
+ updateAccountData: () => void;
+ history: History;
}
export default class Settings extends React.Component<IProps> {
+ public componentDidMount() {
+ if (this.props.history.action === 'PUSH') {
+ this.props.updateAccountData();
+ }
+ }
+
public render() {
const showLargeTitle = this.props.loginState.type !== 'ok';