0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

Updated development mode to handle account pages

no issue

- Allows development mode to open account pages with dummy member for testing
This commit is contained in:
Rish 2020-07-16 12:08:24 +05:30
parent 9ccbef5db1
commit 3b8b2c3f2a
2 changed files with 4 additions and 2 deletions
ghost/portal/src

View file

@ -61,7 +61,7 @@ export default class App extends React.Component {
// Loads default page and popup state for local UI testing
if (process.env.NODE_ENV === 'development') {
return {
page: 'links',
page: 'accountHome',
showPopup: true
};
}
@ -177,6 +177,8 @@ export default class App extends React.Component {
return member || Fixtures.member.free;
}
return null;
} else if (process.env.NODE_ENV === 'development') {
return member || Fixtures.member.free;
}
return null;
}

View file

@ -1,6 +1,6 @@
function isPreviewMode() {
const [path, qs] = window.location.hash.substr(1).split('?');
return (path === '/portal' && qs);
return ((process.env.NODE_ENV === 'development') || (path === '/portal' && qs));
}
export default isPreviewMode;