var ReactBootstrap = require('react-bootstrap') , Grid = ReactBootstrap.Grid , Col = ReactBootstrap.Col , Row = ReactBootstrap.Row , ListGroupItem = ReactBootstrap.ListGroupItem , ListGroup = ReactBootstrap.ListGroup , Nav = ReactBootstrap.Nav , NavItem = ReactBootstrap.NavItem , Button = ReactBootstrap.Button , ButtonGroup = ReactBootstrap.ButtonGroup , Glyphicon = ReactBootstrap.Glyphicon var React = require('react'); var Router = require('react-router'); var Route = Router.Route; var DefaultRoute = Router.DefaultRoute; var RouteHandler = Router.RouteHandler; var Link = Router.Link; var SetIntervalMixin = require("../common/SetIntervalMixin.js"); var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js'); var ProfileMixin = require('../common/ProfileMixin.js'); var FollowButton = require('../common/FollowButton.js'); var EditProfileModalButton = require('../profile/EditProfileModalButton.js'); var EditAvatarModalButton = require('../profile/EditAvatarModalButton.js'); module.exports = Post = React.createClass({ mixins: [ SetIntervalMixin, SafeStateChangeMixin, ProfileMixin ], contextTypes: { router: React.PropTypes.func }, getHandlerKey: function () { var childDepth = 2; // assuming App is top-level route var router = this.context.router; //console.log(router.getCurrentParams()) if ( router.getCurrentRoutes()[childDepth] ) { var key = router.getCurrentRoutes()[childDepth].name; if (key.indexOf("active")>-1) {key+="/"+this.props.activeAccount;} var id = JSON.stringify(router.getCurrentParams()); if (id) { key += id; } //console.log(key); return key; } else {return "none"} }, render: function() { var routeprefix = "#/profile/"+(this.context.router.getCurrentParams().username ? this.context.router.getCurrentParams().username+"/" : "") var subroute = this.context.router.getCurrentRoutes()[2].name //console.log(this.context.router.getCurrentRoutes()); return (

{this.state.fullname} {'@'+this.state.username}

{this.state.location}

{this.state.bio}

{this.state.url}

); } });