Skip to content

Commit

Permalink
use the company field, not the investment project (#6373)
Browse files Browse the repository at this point in the history
  • Loading branch information
chopkinsmade authored Dec 20, 2023
1 parent a8680b3 commit 0261d02
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/client/modules/Tasks/TaskDetails/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,9 @@ const StyledTag = styled(Tag)`
margin-bottom: ${SPACING.SCALE_2};
`

const getCompany = (task) => {
return task?.investmentProject?.investorCompany
}

const TaskDetails = ({ task, breadcrumbs }) => {
const { taskId } = useParams()

const company = getCompany(task)
const taskTitle = task ? task.title : ''
const archivedTag = task?.archived && (
<StyledTag colour="green" data-test="activity-kind-label">
Expand All @@ -48,7 +43,7 @@ const TaskDetails = ({ task, breadcrumbs }) => {
onSuccessDispatch: TASK_DETAILS_LOADED,
}}
>
{() => task && <TaskDetailsTable task={task} company={company} />}
{() => task && <TaskDetailsTable task={task} company={task?.company} />}
</Task.Status>
</DefaultLayout>
)
Expand Down

0 comments on commit 0261d02

Please sign in to comment.