diff --git a/packages/web-shared/components/FeatureFeedList/FeatureFeedListGrid.js b/packages/web-shared/components/FeatureFeedList/FeatureFeedListGrid.js index be70546e..89a21fa1 100644 --- a/packages/web-shared/components/FeatureFeedList/FeatureFeedListGrid.js +++ b/packages/web-shared/components/FeatureFeedList/FeatureFeedListGrid.js @@ -5,7 +5,11 @@ import { withTheme } from 'styled-components'; import { getURLFromType } from '../../utils'; import { Box, ContentCard, H3 } from '../../ui-kit'; -import { add as addBreadcrumb, useBreadcrumbDispatch } from '../../providers/BreadcrumbProvider'; +import { + add as addBreadcrumb, + reset as resetBreadcrumb, + useBreadcrumbDispatch, +} from '../../providers/BreadcrumbProvider'; import { open as openModal, set as setModal, useModal } from '../../providers/ModalProvider'; @@ -19,7 +23,7 @@ function FeatureFeedListGrid(props = {}) { dispatchBreadcrumb( addBreadcrumb({ url: `?id=${getURLFromType(item.relatedNode)}`, - title: item.relatedNode?.title, + title: item.title, }) ); setSearchParams(`?id=${getURLFromType(item.relatedNode)}`); diff --git a/packages/web-shared/components/Searchbar/SearchResults.js b/packages/web-shared/components/Searchbar/SearchResults.js index e55ea65b..3c560528 100644 --- a/packages/web-shared/components/Searchbar/SearchResults.js +++ b/packages/web-shared/components/Searchbar/SearchResults.js @@ -10,7 +10,11 @@ import Feed from '../FeatureFeed'; import { ResourceCard, Box } from '../../ui-kit'; import { getURLFromType } from '../../utils'; -import { add as addBreadcrumb, useBreadcrumbDispatch } from '../../providers/BreadcrumbProvider'; +import { + add as addBreadcrumb, + reset as resetBreadcrumb, + useBreadcrumbDispatch, +} from '../../providers/BreadcrumbProvider'; import { open as openModal, set as setModal, useModal } from '../../providers/ModalProvider'; import { ClockCounterClockwise, MagnifyingGlass, CaretRight, X } from 'phosphor-react'; @@ -139,6 +143,7 @@ const SearchResults = ({ autocompleteState, autocomplete }) => { }, [autocompleteState.collections]); const handleActionPress = (item) => { + dispatchBreadcrumb(resetBreadcrumb()); if (searchParams.get('id') !== getURLFromType(item)) { dispatchBreadcrumb( addBreadcrumb({