Commit a3b3a66f authored by seotts's avatar seotts

Rename button; change placeholder text

lint fix

lint
parent b3795c94
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
"studio.projectsHeader": "Projects", "studio.projectsHeader": "Projects",
"studio.addProjectsHeader": "Add Projects", "studio.addProjectsHeader": "Add Projects",
"studio.addProject": "Add", "studio.addProject": "Add by URL",
"studio.addProjectPlaceholder": "Project URL",
"studio.openToAll": "Anyone can add projects", "studio.openToAll": "Anyone can add projects",
......
...@@ -3,7 +3,7 @@ import React, {useState} from 'react'; ...@@ -3,7 +3,7 @@ import React, {useState} from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import classNames from 'classnames'; import classNames from 'classnames';
import {FormattedMessage, intlShape, injectIntl} from 'react-intl'; import {FormattedMessage} from 'react-intl';
import {Errors, addProject} from './lib/studio-project-actions'; import {Errors, addProject} from './lib/studio-project-actions';
import UserProjectsModal from './modals/user-projects-modal.jsx'; import UserProjectsModal from './modals/user-projects-modal.jsx';
...@@ -23,7 +23,7 @@ const errorToMessageId = error => { ...@@ -23,7 +23,7 @@ const errorToMessageId = error => {
} }
}; };
const StudioProjectAdder = ({intl, onSubmit}) => { const StudioProjectAdder = ({onSubmit}) => {
const [value, setValue] = useState(''); const [value, setValue] = useState('');
const [submitting, setSubmitting] = useState(false); const [submitting, setSubmitting] = useState(false);
const [error, setError] = useState(null); const [error, setError] = useState(null);
...@@ -67,7 +67,7 @@ const StudioProjectAdder = ({intl, onSubmit}) => { ...@@ -67,7 +67,7 @@ const StudioProjectAdder = ({intl, onSubmit}) => {
className={classNames({'mod-form-error': error})} className={classNames({'mod-form-error': error})}
disabled={submitting} disabled={submitting}
type="text" type="text"
placeholder={intl.formatMessage({id: 'studio.addProjectPlaceholder'})} placeholder="http://scratch.mit.edu/projects/xxxx"
value={value} value={value}
onKeyDown={e => e.key === 'Enter' && submit()} onKeyDown={e => e.key === 'Enter' && submit()}
onChange={e => setValue(e.target.value)} onChange={e => setValue(e.target.value)}
...@@ -93,8 +93,7 @@ const StudioProjectAdder = ({intl, onSubmit}) => { ...@@ -93,8 +93,7 @@ const StudioProjectAdder = ({intl, onSubmit}) => {
}; };
StudioProjectAdder.propTypes = { StudioProjectAdder.propTypes = {
onSubmit: PropTypes.func, onSubmit: PropTypes.func
intl: intlShape
}; };
const mapStateToProps = () => ({}); const mapStateToProps = () => ({});
...@@ -103,4 +102,4 @@ const mapDispatchToProps = ({ ...@@ -103,4 +102,4 @@ const mapDispatchToProps = ({
onSubmit: addProject onSubmit: addProject
}); });
export default connect(mapStateToProps, mapDispatchToProps)(injectIntl(StudioProjectAdder)); export default connect(mapStateToProps, mapDispatchToProps)(StudioProjectAdder);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment