Edits based on feedback

thanks @rschamp !
This commit is contained in:
Matthew Taylor 2016-11-10 15:00:33 -05:00
parent c6cd701464
commit d2474c87a5
3 changed files with 15 additions and 16 deletions

View file

@ -17,12 +17,6 @@ var Modal = React.createClass({
className: React.PropTypes.string, className: React.PropTypes.string,
overlayClassName: React.PropTypes.string overlayClassName: React.PropTypes.string
}, },
getDefaultProps: function () {
return {
className: '',
overlayClassName: ''
};
},
requestClose: function () { requestClose: function () {
return this.refs.modal.portal.requestClose(); return this.refs.modal.portal.requestClose();
}, },

View file

@ -9,19 +9,12 @@ Modal.setAppElement(document.getElementById('view'));
var IframeModal = React.createClass({ var IframeModal = React.createClass({
propTypes: { propTypes: {
componentKey: React.PropTypes.string,
isOpen: React.PropTypes.bool, isOpen: React.PropTypes.bool,
onRequestClose: React.PropTypes.func, onRequestClose: React.PropTypes.func,
className: React.PropTypes.string, className: React.PropTypes.string,
componentRef: React.PropTypes.string, componentRef: React.PropTypes.string,
src: React.PropTypes.string src: React.PropTypes.string
}, },
getDefaultProps: function () {
return {
className: '',
iframeClassName: ''
};
},
render: function () { render: function () {
var iframeClasses = classNames( var iframeClasses = classNames(
'modal-content-iframe', 'modal-content-iframe',
@ -29,7 +22,6 @@ var IframeModal = React.createClass({
); );
return ( return (
<Modal <Modal
key={this.props.componentKey}
isOpen={this.props.isOpen} isOpen={this.props.isOpen}
onRequestClose={this.props.onRequestClose} onRequestClose={this.props.onRequestClose}
className={this.props.className} className={this.props.className}

View file

@ -19,6 +19,7 @@ var IframeModal = require('../../components/modal/iframe/modal.jsx');
var News = require('../../components/news/news.jsx'); var News = require('../../components/news/news.jsx');
var Page = require('../../components/page/www/page.jsx'); var Page = require('../../components/page/www/page.jsx');
var TeacherBanner = require('../../components/teacher-banner/teacher-banner.jsx'); var TeacherBanner = require('../../components/teacher-banner/teacher-banner.jsx');
var TTTModal = require('../../components/modal/ttt/modal.jsx');
var Welcome = require('../../components/welcome/welcome.jsx'); var Welcome = require('../../components/welcome/welcome.jsx');
var MediaQuery = require('react-responsive'); var MediaQuery = require('react-responsive');
@ -35,7 +36,7 @@ var Splash = injectIntl(React.createClass({
news: [], // gets news posts from the scratch Tumblr news: [], // gets news posts from the scratch Tumblr
featuredCustom: {}, // custom homepage rows, such as "Projects by Scratchers I'm Following" featuredCustom: {}, // custom homepage rows, such as "Projects by Scratchers I'm Following"
featuredGlobal: {}, // global homepage rows, such as "Featured Projects" featuredGlobal: {}, // global homepage rows, such as "Featured Projects"
showEmailConfirmationModal: false, // flag that determines whether to show banner to request email conf. showEmailConfirmationModal: true, // flag that determines whether to show banner to request email conf.
refreshCacheStatus: 'notrequested' refreshCacheStatus: 'notrequested'
}; };
}, },
@ -352,7 +353,6 @@ var Splash = injectIntl(React.createClass({
<a href="/info/faq/#accounts">Having trouble?</a> <a href="/info/faq/#accounts">Having trouble?</a>
</DropdownBanner>, </DropdownBanner>,
<IframeModal <IframeModal
componentKey="emailConfirmationModal"
isOpen={this.state.emailConfirmationModalOpen} isOpen={this.state.emailConfirmationModalOpen}
onRequestClose={this.hideEmailConfirmationModal} onRequestClose={this.hideEmailConfirmationModal}
className="mod-confirmation" className="mod-confirmation"
@ -363,6 +363,19 @@ var Splash = injectIntl(React.createClass({
{this.props.permissions.educator ? [ {this.props.permissions.educator ? [
<TeacherBanner key="teacherbanner" messages={messages} /> <TeacherBanner key="teacherbanner" messages={messages} />
] : []} ] : []}
<TTTModal
title="Make it Fly"
description="Animate the Scratch Cat, the Powerpuff Girls, or even a taco!"
tutorialLoc="/"
activityLoc="/pdfs/cards/Scratch2Cards.pdf"
guideLoc="/pdfs/cards/Scratch2Cards.pdf"
bannerUrl="/images/ttt/make-it-fly-banner.jpg"
thumbUrl=""
modalProps={{
isOpen: true,
ref: 'tttModal'
}}
/>
<div key="inner" className="inner"> <div key="inner" className="inner">
{this.props.session.status === sessionActions.Status.FETCHED ? ( {this.props.session.status === sessionActions.Status.FETCHED ? (
this.props.session.session.user ? [ this.props.session.session.user ? [