Replaced signup with invite-only screen for no plans

no issue
- If the site owner has no active plan enabled for signup in settings, it implies an invite-only site usecase which needs to be highlighted to he user
- Shows the invite only message along with option to login when SIgnup screen is opened in such scenario
This commit is contained in:
Rish 2020-10-16 14:46:01 +05:30
parent 510dfd75d9
commit ae2023999a

View File

@ -304,6 +304,11 @@ class SignupPage extends React.Component {
renderSubmitButton() {
const {action, site, brandColor} = this.context;
const availablePlans = getSitePlans({site});
if (availablePlans.length === 0) {
return null;
}
let label = 'Continue';
if (hasOnlyFreePlan({site})) {
label = 'Sign up';
@ -367,7 +372,17 @@ class SignupPage extends React.Component {
renderForm() {
const fields = this.getInputFields({state: this.state});
const {site} = this.context;
const availablePlans = getSitePlans({site});
if (availablePlans.length === 0) {
return (
<section>
<div className='gh-portal-section'>
This site is invite only. Contact owner if you'd like to sign up.
</div>
</section>
);
}
return (
<section>
<div className='gh-portal-section'>