Archived
This may be the last commit from this machine
This commit is contained in:
1 parent
9631181cb9
commit
e0f81e3c3c
5 files changed
+100
-72
No files matched your search
@@ -1,17 +1,45 @@
|
||||
import React, { Component } from "react";
|
||||
|
||||
import { getMigrations } from "../actions/requests";
|
||||
import { callAPI } from "../../services/API";
|
||||
import Migrations from "../Migrations/Migrations";
|
||||
import Error from "../actions/Error";
|
||||
import SideMigrations from "../Migrations/SideMigrations";
|
||||
|
||||
export class Home extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
migs: [],
|
||||
error: false,
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
callAPI
|
||||
.get()
|
||||
.then((request) => {
|
||||
this.setState({
|
||||
migs: request.data,
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
this.setState({
|
||||
error: true,
|
||||
});
|
||||
});
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<div className="row">
|
||||
<div className="col s8">
|
||||
<Migrations />
|
||||
<Migrations migs={this.state.migs} />
|
||||
</div>
|
||||
<div className="col s4">
|
||||
<h3>Side Migrations goes here</h3>
|
||||
<h3>
|
||||
Side Migrations goes here
|
||||
<SideMigrations migs={this.state.migs} />
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -21,4 +49,4 @@ export class Home extends Component {
|
||||
export default Home;
|
||||
|
||||
// Broken
|
||||
// <SideMigrations />
|
||||
// <SideMigrations migs={this.state.migs} />
|
||||
Reference in new issue
Block a user