Skip to content

Commit

Permalink
fix: partner detail breadcrumbs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
okorie2 committed May 19, 2023
1 parent a5d5cf0 commit 3f914db
Showing 1 changed file with 32 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ export function InvestmentsDisbursedModule(
]);
} else if (
props.isPartnerDetail &&
!find(dataPathSteps, (step) => step.path.indexOf("/partner/") > -1)
!find(dataPathSteps, (step) => step.path.indexOf("/partner/") > -1) &&
props.partnerName
) {
addDataPathSteps([
{
Expand All @@ -131,17 +132,35 @@ export function InvestmentsDisbursedModule(
},
]);
}
if (
dataPathSteps.length === 0 ||
!find(dataPathSteps, { name: `Grant Implementation: ${props.type}` })
) {
addDataPathSteps([
{
id: uniqueId(),
name: `Grant Implementation: ${props.type}`,
path: `${history.location.pathname}${history.location.search}`,
},
]);
if (props.isPartnerDetail) {
if (
props.partnerName &&
(dataPathSteps.length === 0 ||
!find(dataPathSteps, {
name: `Grant Implementation: ${props.type}`,
}))
) {
addDataPathSteps([
{
id: uniqueId(),
name: `Grant Implementation: ${props.type}`,
path: `${history.location.pathname}${history.location.search}`,
},
]);
}
} else {
if (
dataPathSteps.length === 0 ||
!find(dataPathSteps, { name: `Grant Implementation: ${props.type}` })
) {
addDataPathSteps([
{
id: uniqueId(),
name: `Grant Implementation: ${props.type}`,
path: `${history.location.pathname}${history.location.search}`,
},
]);
}
}
}
if (props.vizLevel > 0 && props.vizSelected) {
Expand All @@ -157,7 +176,7 @@ export function InvestmentsDisbursedModule(
},
]);
}
}, [props.vizLevel, props.vizSelected]);
}, [props.vizLevel, props.vizSelected, props.partnerName]);

const setToolboxPanelDisbursementsSliderMaxValue = useStoreActions(
(store) => store.ToolBoxPanelDisbursementsSliderValues.setMax
Expand Down

0 comments on commit 3f914db

Please sign in to comment.