Refactor delete object and share object components (#5537)

This commit is contained in:
Kanagaraj M
2018-02-19 09:37:59 +05:30
committed by Harshavardhana
parent 566ac78b8b
commit da4558a8f7
13 changed files with 988 additions and 6 deletions

View File

@@ -18,16 +18,17 @@ import React from "react"
import humanize from "humanize"
import Moment from "moment"
import ObjectItem from "./ObjectItem"
import ObjectActions from "./ObjectActions"
import * as actionsObjects from "./actions"
export const ObjectContainer = ({ object }) => {
const actionButtons = []
const actionButtons = <ObjectActions object={object} />
const props = {
name: object.name,
contentType: object.contentType,
size: humanize.filesize(object.size),
lastModified: Moment(object.lastModified).format("lll"),
actionButtons: []
actionButtons: actionButtons
}
return <ObjectItem {...props} />
}