From b09e90b5b9eaca89423bbc54dae2212a8e64ad79 Mon Sep 17 00:00:00 2001 From: Ovidio Rodriguez Date: Tue, 13 Sep 2022 13:49:48 -0400 Subject: [PATCH 1/3] Add redirect --- src/components/EditAllocationInfo.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/components/EditAllocationInfo.js b/src/components/EditAllocationInfo.js index a2173e93..588b9a70 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,12 @@ const EditAllocationInfo = (props) => { }) } + console.log(allocation.contributor) + + const redirectToContributor = () => { + history.push('/contributor/' + allocation.contributor.id) + } + return ( { {`Contributor`} - - {`${allocation.contributor.name}`} + + + {`${allocation.contributor.name}`} + From da4a2a76ca9c2faa28ab0dcd482d766f34dd875a Mon Sep 17 00:00:00 2001 From: Ovidio Rodriguez Date: Tue, 13 Sep 2022 13:50:02 -0400 Subject: [PATCH 2/3] Add styles --- src/styles/EditAllocationInfo.scss | 14 ++++++++++++++ src/styles/index.scss | 1 + 2 files changed, 15 insertions(+) create mode 100644 src/styles/EditAllocationInfo.scss 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'; From 07a9d99f2aa0dd71069c0d0177305f394d8011fd Mon Sep 17 00:00:00 2001 From: Ovidio Rodriguez Date: Tue, 13 Sep 2022 13:51:45 -0400 Subject: [PATCH 3/3] Delete log --- src/components/EditAllocationInfo.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/EditAllocationInfo.js b/src/components/EditAllocationInfo.js index 588b9a70..684aee53 100644 --- a/src/components/EditAllocationInfo.js +++ b/src/components/EditAllocationInfo.js @@ -111,8 +111,6 @@ const EditAllocationInfo = (props) => { }) } - console.log(allocation.contributor) - const redirectToContributor = () => { history.push('/contributor/' + allocation.contributor.id) }