This repository has been archived on 2026-04-30. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
kingdombattles/src/components/pages/signup.jsx
T
2019-05-31 13:44:01 +10:00

40 lines
790 B
React

import React from 'react';
import { withRouter, Link } from 'react-router-dom';
//panels
import SignupPanel from '../panels/signup.jsx';
class Signup extends React.Component {
constructor(props) {
super(props);
this.state = {
signedUp: ''
}
//TODO: referral links
}
render() {
let Panel;
if (!this.state.signedUp) {
Panel = () => {
return (<SignupPanel onSuccess={ (msg) => this.setState({signedUp: msg}) } />);
}
} else {
Panel = () => {
return (<p className='centered'>{this.state.signedUp}</p>);
}
}
return (
<div className='page constrained'>
<Panel />
<Link to='/' className='centered'>Return Home</Link>
<p className='centered'>Remember to verify your email!</p>
</div>
);
}
};
export default withRouter(Signup);