mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-08 02:52:39 -05:00
Added members support address from site data
closes https://github.com/TryGhost/members.js/issues/90 - Uses new members support address from site data for "Contact Support" button
This commit is contained in:
parent
d32a19f66c
commit
e3a957deb6
2 changed files with 8 additions and 5 deletions
|
@ -96,11 +96,12 @@ const UserAvatar = ({avatar, brandColor}) => {
|
|||
);
|
||||
};
|
||||
|
||||
const AccountFooter = ({onClose}) => {
|
||||
const AccountFooter = ({onClose, supportAddress = ''}) => {
|
||||
const supportAddressMail = `mailto:${supportAddress}`;
|
||||
return (
|
||||
<footer className='gh-portal-account-footer'>
|
||||
<ul className='gh-portal-account-footermenu'>
|
||||
<li><button className='gh-portal-btn'>Contact support</button></li>
|
||||
<li><a className='gh-portal-btn' href={supportAddressMail}>Contact support</a></li>
|
||||
</ul>
|
||||
<div className='gh-portal-account-footerright'>
|
||||
<ul className='gh-portal-account-footermenu'>
|
||||
|
@ -395,7 +396,8 @@ export default class AccountHomePage extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const {member} = this.context;
|
||||
const {member, site} = this.context;
|
||||
const {members_support_address: supportAddress} = site;
|
||||
if (!member) {
|
||||
return null;
|
||||
}
|
||||
|
@ -410,7 +412,7 @@ export default class AccountHomePage extends React.Component {
|
|||
openUpdatePlan={(e, subscribed) => this.openUpdatePlan(e, subscribed)}
|
||||
onEditBilling={(e, subscribed) => this.onEditBilling(e, subscribed)}
|
||||
/>
|
||||
<AccountFooter onClose={() => this.context.onAction('closePopup')} />
|
||||
<AccountFooter onClose={() => this.context.onAction('closePopup')} supportAddress={supportAddress} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,8 @@ export const site = {
|
|||
portal_plans: ['free', 'monthly', 'yearly'],
|
||||
portal_button_icon: 'icon-1',
|
||||
portal_button_signup_text: 'Subscribe now',
|
||||
portal_button_style: 'icon-and-text'
|
||||
portal_button_style: 'icon-and-text',
|
||||
members_support_address: 'support@example.com'
|
||||
};
|
||||
|
||||
export const member = {
|
||||
|
|
Loading…
Add table
Reference in a new issue