mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-18 09:00:30 -05:00
fix merge conflicts from upstream/develop
This commit is contained in:
parent
ed924e3b2c
commit
c19c32ded3
1 changed files with 7 additions and 4 deletions
|
@ -11,6 +11,7 @@ var api = require('../../../lib/api');
|
||||||
var Avatar = require('../../avatar/avatar.jsx');
|
var Avatar = require('../../avatar/avatar.jsx');
|
||||||
var Button = require('../../forms/button.jsx');
|
var Button = require('../../forms/button.jsx');
|
||||||
var Dropdown = require('../../dropdown/dropdown.jsx');
|
var Dropdown = require('../../dropdown/dropdown.jsx');
|
||||||
|
var Form = require('../../forms/form.jsx');
|
||||||
var Input = require('../../forms/input.jsx');
|
var Input = require('../../forms/input.jsx');
|
||||||
var log = require('../../../lib/log.js');
|
var log = require('../../../lib/log.js');
|
||||||
var Login = require('../../login/login.jsx');
|
var Login = require('../../login/login.jsx');
|
||||||
|
@ -173,6 +174,9 @@ var Navigation = React.createClass({
|
||||||
this.props.dispatch(sessionActions.refreshSession());
|
this.props.dispatch(sessionActions.refreshSession());
|
||||||
this.closeRegistration();
|
this.closeRegistration();
|
||||||
},
|
},
|
||||||
|
onSearchSubmit: function (formData) {
|
||||||
|
window.location.href = '/search/projects?q=' + formData.q;
|
||||||
|
},
|
||||||
render: function () {
|
render: function () {
|
||||||
var classes = classNames({
|
var classes = classNames({
|
||||||
'logged-in': this.props.session.session.user
|
'logged-in': this.props.session.session.user
|
||||||
|
@ -219,14 +223,13 @@ var Navigation = React.createClass({
|
||||||
</MediaQuery>
|
</MediaQuery>
|
||||||
|
|
||||||
<MediaQuery minWidth={frameless.desktop} component="li" className="search">
|
<MediaQuery minWidth={frameless.desktop} component="li" className="search">
|
||||||
<form action="/search/projects" method="get">
|
<Form onSubmit={this.onSearchSubmit}>
|
||||||
<Button type="submit" className="btn-search" />
|
<Button type="submit" className="btn-search" />
|
||||||
<Input type="text"
|
<Input type="text"
|
||||||
aria-label={formatMessage({id: 'general.search'})}
|
aria-label={formatMessage({id: 'general.search'})}
|
||||||
placeholder={formatMessage({id: 'general.search'})}
|
placeholder={formatMessage({id: 'general.search'})}
|
||||||
name="q"
|
name="q" />
|
||||||
noformsy />
|
</Form>
|
||||||
</form>
|
|
||||||
</MediaQuery>
|
</MediaQuery>
|
||||||
{this.props.session.status === sessionActions.Status.FETCHED ? (
|
{this.props.session.status === sessionActions.Status.FETCHED ? (
|
||||||
this.props.session.session.user ? [
|
this.props.session.session.user ? [
|
||||||
|
|
Loading…
Reference in a new issue