1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-27 08:31:50 +00:00

before applying redux

This commit is contained in:
Rokt33r
2015-10-08 20:40:19 +09:00
parent 116ddf345d
commit 979dcead49
86 changed files with 5445 additions and 2323 deletions

View File

@@ -4,12 +4,12 @@ var mixin = {}
mixin.OnlyGuest = {
componentDidMount: function () {
var currentUser = localStorage.getItem('currentUser')
var currentUser = JSON.parse(localStorage.getItem('currentUser'))
if (currentUser == null) {
return
}
this.transitionTo('userHome', {userName: currentUser.name})
this.transitionTo('homeDefault')
}
}

View File

@@ -6,6 +6,7 @@ var md = markdownit({
var Markdown = {
markdown: function (content) {
if (content == null) content = ''
return md.render(content)
}
}

View File

@@ -1,4 +1,4 @@
var React = require('react/addons')
import React from 'react'
var ModalBase = React.createClass({
getInitialState: function () {
return {

View File

@@ -21,11 +21,9 @@ function setPartialState (component, path, value) {
updateIn(component.state, path, value))
}
module.exports = {
linkState: function (path) {
return {
value: getIn(this.state, path),
requestChange: setPartialState.bind(null, this, path)
}
export default function linkState (path) {
return {
value: getIn(this.state, path),
requestChange: setPartialState.bind(null, this, path)
}
}