From 694ec683fe4c664cccf1fc112610e63d6644d506 Mon Sep 17 00:00:00 2001 From: Rish Date: Thu, 7 May 2020 21:04:31 +0530 Subject: [PATCH] Added free account home to use account profile refs https://github.com/TryGhost/members.js/issues/20 - Clicking settings on free member's account home now takes them to profile page --- ghost/portal/src/components/pages/AccountHomePage.js | 7 +++++-- ghost/portal/src/components/pages/AccountProfilePage.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghost/portal/src/components/pages/AccountHomePage.js b/ghost/portal/src/components/pages/AccountHomePage.js index 018e7b6e6a..86af0f9be8 100644 --- a/ghost/portal/src/components/pages/AccountHomePage.js +++ b/ghost/portal/src/components/pages/AccountHomePage.js @@ -61,7 +61,10 @@ export default class AccountHomePage extends React.Component { } openSettings(e) { - // no-op + this.context.onAction('switchPage', { + page: 'accountProfile', + lastPage: 'accountHome' + }); } openSubscribe(e) { @@ -73,7 +76,7 @@ export default class AccountHomePage extends React.Component { renderAccountFooter() { return ( -
+
Contact support
this.openSettings(e)} role='button'> Settings
diff --git a/ghost/portal/src/components/pages/AccountProfilePage.js b/ghost/portal/src/components/pages/AccountProfilePage.js index 2237997d39..a10ea14598 100644 --- a/ghost/portal/src/components/pages/AccountProfilePage.js +++ b/ghost/portal/src/components/pages/AccountProfilePage.js @@ -33,7 +33,7 @@ export default class AccountProfilePage extends React.Component { renderAccountFooter() { return ( -
+
Delete Account