mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-26 17:16:11 -05:00
Merge pull request #94 from thisandagain/bugfix/messages
Fix messages XHR request and prop defaults
This commit is contained in:
commit
41770ad549
4 changed files with 30 additions and 28 deletions
|
@ -11,7 +11,9 @@ var AdminPanel = React.createClass({
|
||||||
Session
|
Session
|
||||||
],
|
],
|
||||||
getInitialState: function () {
|
getInitialState: function () {
|
||||||
return {showPanel: true};
|
return {
|
||||||
|
showPanel: false
|
||||||
|
};
|
||||||
},
|
},
|
||||||
handleToggleVisibility: function (e) {
|
handleToggleVisibility: function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
|
@ -2,48 +2,49 @@
|
||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"title": "Example Project",
|
"title": "Project",
|
||||||
"thumbnailUrl": "http://www.lorempixel.com/144/108/",
|
"thumbnailUrl": "",
|
||||||
"creator": "raimondious",
|
"creator": "",
|
||||||
"href": "/projects/1000/"
|
"href": "#"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 2,
|
"id": 2,
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"title": "Example Project",
|
"title": "Project",
|
||||||
"thumbnailUrl": "http://www.lorempixel.com/144/108/",
|
"thumbnailUrl": "",
|
||||||
"href": "/projects/1000/"
|
"creator": "",
|
||||||
|
"href": "#"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 3,
|
"id": 3,
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"title": "Example Project",
|
"title": "Project",
|
||||||
"thumbnailUrl": "http://www.lorempixel.com/144/108/",
|
"thumbnailUrl": "",
|
||||||
"creator": "raimondious",
|
"creator": "",
|
||||||
"href": "/projects/1000/"
|
"href": "#"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 4,
|
"id": 4,
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"title": "Example Project",
|
"title": "Project",
|
||||||
"thumbnailUrl": "http://www.lorempixel.com/144/108/",
|
"thumbnailUrl": "",
|
||||||
"creator": "raimondious",
|
"creator": "",
|
||||||
"href": "/projects/1000/"
|
"href": "#"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 5,
|
"id": 5,
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"title": "Example Project",
|
"title": "Project",
|
||||||
"thumbnailUrl": "http://www.lorempixel.com/144/108/",
|
"thumbnailUrl": "",
|
||||||
"creator": "raimondious",
|
"creator": "",
|
||||||
"href": "/projects/1000/"
|
"href": "#"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 6,
|
"id": 6,
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"title": "Example Project",
|
"title": "Project",
|
||||||
"thumbnailUrl": "http://www.lorempixel.com/144/108/",
|
"thumbnailUrl": "",
|
||||||
"creator": "raimondious",
|
"creator": "",
|
||||||
"href": "/projects/1000/"
|
"href": "#"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -82,7 +82,6 @@ var Navigation = React.createClass({
|
||||||
getMessageCount: function () {
|
getMessageCount: function () {
|
||||||
this.api({
|
this.api({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
host: '',
|
|
||||||
uri: '/proxy/users/' + this.state.session.user.username + '/activity/count'
|
uri: '/proxy/users/' + this.state.session.user.username + '/activity/count'
|
||||||
}, function (err, body) {
|
}, function (err, body) {
|
||||||
if (body) {
|
if (body) {
|
||||||
|
|
|
@ -10,9 +10,9 @@ var Thumbnail = React.createClass({
|
||||||
},
|
},
|
||||||
getDefaultProps: function () {
|
getDefaultProps: function () {
|
||||||
return {
|
return {
|
||||||
href: '/projects/1000/',
|
href: '#',
|
||||||
title: 'Example Project',
|
title: 'Project',
|
||||||
src: 'http://www.lorempixel.com/144/108/',
|
src: '',
|
||||||
type: 'project',
|
type: 'project',
|
||||||
showLoves: false,
|
showLoves: false,
|
||||||
showRemixes: false
|
showRemixes: false
|
||||||
|
|
Loading…
Reference in a new issue