We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f816685 commit 0b10460Copy full SHA for 0b10460
src/components/Layout/LayoutHeader.tsx
@@ -51,6 +51,16 @@ export const LayoutHeader = ({
51
}
52
};
53
54
+ // Search result transform function that will strip out the pageMain anchor tag
55
+ const transformItems = (items) => {
56
+ items.map((item) => {
57
+ if (item.url.includes('#pageMain')) {
58
+ item.url = item.url.replace('#pageMain', '');
59
+ }
60
+ });
61
+ return items;
62
+ };
63
+
64
return (
65
<View as="header" className="layout-header">
66
<Flex className={`layout-search layout-search--${pageType}`}>
@@ -82,6 +92,7 @@ export const LayoutHeader = ({
82
92
`gen:${isGen1 ? 'gen1' : 'gen2'}`
83
93
]
84
94
}}
95
+ transformItems={transformItems}
85
96
/>
86
97
</View>
87
98
0 commit comments