import React, { Component, PropTypes } from 'react';
import LoadingIndicator from 'components/loading-indicator';
import ExplorerItem from './explorer-item';
import { API } from 'config';
class Explorer extends Component {
constructor(props) {
super(props);
this.state = { cursor: null };
}
componentDidMount() {
fetch(`${API}/pages/?child_of=root`)
.then(res => res.json())
.then(body => {
this.setState({
cursor: body
});
});
}
componentWillUnmount(cursor) {
}
_getPages(cursor) {
if (!cursor) {
return [];
}
return cursor.pages.map(item =>