Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions src/components/EditAllocationInfo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useEffect, useState } from 'react'
import { useHistory } from 'react-router-dom'
import {
Collapse,
Grid,
Expand Down Expand Up @@ -36,6 +37,8 @@ const EditAllocationInfo = (props) => {

const [openPayments, setOpenPayments] = useState(false)

const history = useHistory()

const handleClickPayments = () => {
setOpenPayments(!openPayments)
}
Expand Down Expand Up @@ -108,6 +111,10 @@ const EditAllocationInfo = (props) => {
})
}

const redirectToContributor = () => {
history.push('/contributor/' + allocation.contributor.id)
}

return (
<Grid
container
Expand All @@ -125,8 +132,14 @@ const EditAllocationInfo = (props) => {
<Grid item xs={6}>
<Typography>
{`Contributor`}
<Typography color='primary'>
{`${allocation.contributor.name}`}
<Typography
className='redirect'
color='primary'
onClick={redirectToContributor}
>
<span>
{`${allocation.contributor.name}`}
</span>
</Typography>
</Typography>
</Grid>
Expand Down
14 changes: 14 additions & 0 deletions src/styles/EditAllocationInfo.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.EditAllocationInfo {

}

@media screen and (min-width: $sm) {
.EditAllocationInfo {
.redirect {
cursor: pointer;
:hover {
color: $grey
}
}
}
}
1 change: 1 addition & 0 deletions src/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ code {
@import './AllocationAddForm.scss';
@import './AllocationOverview.scss';
@import './ClientEditDialog';
@import './EditAllocationInfo.scss';
@import './EditAllocationRate.scss';
@import './EmptyState.scss';
@import './Header.scss';
Expand Down