mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
Merge pull request #144 from mewtaylor/issue/122-register-from-gobo
Add registration component to `JOIN SCRATCH`
This commit is contained in:
commit
fd8515668f
1 changed files with 17 additions and 1 deletions
|
@ -5,6 +5,7 @@ var FormattedMessage = ReactIntl.FormattedMessage;
|
|||
var FormattedHTMLMessage = ReactIntl.FormattedHTMLMessage;
|
||||
|
||||
var Modal = require('../modal/modal.jsx');
|
||||
var Registration = require('../registration/registration.jsx');
|
||||
|
||||
require('./intro.scss');
|
||||
|
||||
|
@ -31,6 +32,17 @@ var Intro = React.createClass({
|
|||
closeVideo: function () {
|
||||
this.setState({videoOpen: false});
|
||||
},
|
||||
handleJoinClick: function (e) {
|
||||
e.preventDefault();
|
||||
this.setState({'registrationOpen': true});
|
||||
},
|
||||
closeRegistration: function () {
|
||||
this.setState({'registrationOpen': false});
|
||||
},
|
||||
completeRegistration: function () {
|
||||
window.refreshSession();
|
||||
this.closeRegistration();
|
||||
},
|
||||
render: function () {
|
||||
var frameSettings = {
|
||||
width: 570,
|
||||
|
@ -77,7 +89,7 @@ var Intro = React.createClass({
|
|||
defaultMessage='SEE EXAMPLES' />
|
||||
</div>
|
||||
</a>
|
||||
<a className="sprite sprite-3" href="#">
|
||||
<a className="sprite sprite-3" href="#" onClick={this.handleJoinClick}>
|
||||
<img
|
||||
className="costume costume-1"
|
||||
src="//cdn.scratch.mit.edu/scratchr2/static/images/gobo-a.png" />
|
||||
|
@ -92,6 +104,10 @@ var Intro = React.createClass({
|
|||
</div>
|
||||
<div className="text subtext">( it’s free )</div>
|
||||
</a>
|
||||
<Registration key="registration"
|
||||
isOpen={this.state.registrationOpen}
|
||||
onRequestClose={this.closeRegistration}
|
||||
onRegistrationDone={this.completeRegistration} />
|
||||
</div>
|
||||
<div className="description">
|
||||
A creative learning community with
|
||||
|
|
Loading…
Reference in a new issue