Skip to content

Commit

Permalink
checking in taskfeatureproperty HOC
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewPhilbin committed Aug 30, 2023
1 parent ab76dec commit 771d4db
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react'
import useMRProperties from '../../../hooks/UseMRProperties/UseMRProperties'
import AsMappableTask from '../../../interactions/Task/AsMappableTask'

const WithTaskFeatureProperties = (Component) => {
return function(props) {
const allFeatureProperties = AsMappableTask(props.task).allFeatureProperties()
const mrProperties = useMRProperties(props.workspaceContext)
const allProperties = Object.assign({}, mrProperties, allFeatureProperties)

return (<Component {...props} taskFeatureProperties={allProperties}/>)
}
}

export default WithTaskFeatureProperties

0 comments on commit 771d4db

Please sign in to comment.