diff --git a/src/components/EditAllocationInfo.js b/src/components/EditAllocationInfo.js index a2173e93..684aee53 100644 --- a/src/components/EditAllocationInfo.js +++ b/src/components/EditAllocationInfo.js @@ -1,4 +1,5 @@ import React, { useEffect, useState } from 'react' +import { useHistory } from 'react-router-dom' import { Collapse, Grid, @@ -36,6 +37,8 @@ const EditAllocationInfo = (props) => { const [openPayments, setOpenPayments] = useState(false) + const history = useHistory() + const handleClickPayments = () => { setOpenPayments(!openPayments) } @@ -108,6 +111,10 @@ const EditAllocationInfo = (props) => { }) } + const redirectToContributor = () => { + history.push('/contributor/' + allocation.contributor.id) + } + return ( { {`Contributor`} - - {`${allocation.contributor.name}`} + + + {`${allocation.contributor.name}`} + diff --git a/src/styles/EditAllocationInfo.scss b/src/styles/EditAllocationInfo.scss new file mode 100644 index 00000000..6b0080df --- /dev/null +++ b/src/styles/EditAllocationInfo.scss @@ -0,0 +1,14 @@ +.EditAllocationInfo { + +} + +@media screen and (min-width: $sm) { + .EditAllocationInfo { + .redirect { + cursor: pointer; + :hover { + color: $grey + } + } + } +} \ No newline at end of file diff --git a/src/styles/index.scss b/src/styles/index.scss index 05a52306..cd10c1d4 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -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';