export getProjectManifest
This commit is contained in:
parent
461604bd66
commit
92c984607b
|
@ -21,6 +21,7 @@ import { timeSinceBlock } from '../../utils/dates'
|
|||
import { getAmountsPledged } from '../../utils/pledges'
|
||||
import { getFiles } from '../../utils/ipfs'
|
||||
import { getImageType } from '../../utils/images'
|
||||
import { getProjectManifest } from '../../utils/project'
|
||||
import { useProjectData } from './hooks'
|
||||
|
||||
const ROOT_PATH = '/root/'
|
||||
|
@ -142,10 +143,6 @@ async function _getProjectAssets(hash, setState){
|
|||
.catch(console.log)
|
||||
}
|
||||
|
||||
const getProjectManifest = assets => {
|
||||
return assets ? JSON.parse(assets.find(a => a.name.toLowerCase() === 'manifest.json').content) : null
|
||||
}
|
||||
|
||||
const formatMedia = content => {
|
||||
const type = 'video/mp4'
|
||||
const blob = new Blob([content], {type})
|
||||
|
|
|
@ -14,7 +14,7 @@ const isManifest = asset => {
|
|||
const name = getName(asset)
|
||||
return name.toLowerCase() === 'manifest.json'
|
||||
}
|
||||
const getProjectManifest = assets => {
|
||||
export const getProjectManifest = assets => {
|
||||
return assets ? JSON.parse(assets.find(isManifest).content) : null
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue