Skip to content
Permalink
Browse files

Get page from DotCMS Api

  • Loading branch information...
fmontes committed Feb 25, 2019
1 parent 7ad1549 commit d5ba85dafb62cdb5e4ab3a05a4daedf76df41440
Showing with 16 additions and 1 deletion.
  1. +16 −1 src/App.js
@@ -3,8 +3,23 @@ import './App.css';
import Page from './components/Page';

class App extends Component {
constructor() {
super();
this.state = {}
}

componentDidMount() {
fetch('http://localhost:8080/api/v1/page/json/about-us', {
headers: {
Authorization: 'Basic ' + btoa('admin@dotcms.com:admin')
}
})
.then(data => data.json())
.then(page => this.setState(page.entity));
}

render() {
return <Page />;
return <Page {...this.state} />;
}
}

0 comments on commit d5ba85d

Please sign in to comment.
You can’t perform that action at this time.