diff --git a/webapp/pages/profile.jsx b/webapp/pages/profile.jsx
index cfe82c3..62be316 100644
--- a/webapp/pages/profile.jsx
+++ b/webapp/pages/profile.jsx
@@ -3,13 +3,14 @@ var Markdown = require('markdown.jsx')
var Link = require('react-router').Link
var Icon = require('icon.jsx')
var GetIPFS = require('getipfs.jsx')
+var { Loading, Error } = require('status-components.jsx')
module.exports = function (boardsAPI) {
return React.createClass({
- getInitialState: function () {
- return { name: '...', boards: [], api: false }
+ getInitialState () {
+ return { loading: true, boards: [], api: false }
},
- componentDidMount: function () {
+ componentDidMount () {
boardsAPI.use(boards => {
if (boards.isInit) {
this.setState({ api: boards, id: boards.id })
@@ -24,10 +25,11 @@ module.exports = function (boardsAPI) {
})
})
},
- componentWillReceiveProps: function (nextProps) {
+ componentWillReceiveProps (nextProps) {
boardsAPI.use(boards => this.downloadProfile(boards, nextProps))
+ this.setState({ loading: true })
},
- downloadProfile: function (boards, props) {
+ downloadProfile (boards, props) {
var ee = boards.getEventEmitter()
var uid = props.params.userid
if (uid === 'me') uid = boards.id
@@ -40,23 +42,20 @@ module.exports = function (boardsAPI) {
boards.getProfile(uid, (err, res) => {
if (!this.isMounted()) return true
if (err) {
- this.setState({
- name: