Skip to content
Snippets Groups Projects
Commit 6839a088 authored by Lewis Liu's avatar Lewis Liu
Browse files

Fixed broken revision history

parent bb7dcb75
Branches
Tags
No related merge requests found
:root {
--subheader-color: #6CAFED;
}
:local(.subheader) {
composes: text-white pl4 pr3 flex align-center from "style";
position: absolute;
top: 0;
left: 0;
right: 0;
height: 40px;
background-color: var(--subheader-color);
}
:local(.subheaderButtons) {
composes: flex-align-right from "style";
}
:local(.subheaderButton) {
border: none;
color: var(--subheader-color);
}
:local(.saveButton) {
composes: mx1 from "style";
}
:local(.cancelButton) {
opacity: 0.5;
}
......@@ -89,7 +89,7 @@ export default class EntityItem extends Component {
</div>
<div className={R.subheaderButtons}>
<button className={cx("Button", "Button--white", "Button--small", R.subheaderButton, R.saveButton)} type="submit">SAVE</button>
<button className={cx("Button", "Button--white", "Button--small", R.subheaderButton, R.cancelButton)} type="submit">CANCEL</button>
<button className={cx("Button", "Button--white", "Button--small", R.subheaderButton, R.cancelButton)} onClick={endEditing}>CANCEL</button>
</div>
</div>
}
......
......@@ -67,7 +67,7 @@ export default class RevisionHistoryApp extends Component {
error
} = this.props;
const entity = metric.id !== undefined ? metric : list;
const entity = metric.id ? metric : list;
const empty = {
icon: 'mine',
......@@ -89,7 +89,7 @@ export default class RevisionHistoryApp extends Component {
</div>
</div>
<LoadingAndErrorWrapper loading={!error && loading} error={error}>
{ () => {console.log(tables); return Object.keys(revisions).length > 0 && tables[entity.table_id] ?
{ () => {console.log(revisions);console.log(tables); console.log(entity); return Object.keys(revisions).length > 0 && tables[entity.table_id] ?
<div className="wrapper wrapper--trim">
{Object.values(revisions)
.map(revision => revision && revision.diff ?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment