File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -161,8 +161,10 @@ export function SearchProvider({ children }: React.PropsWithChildren) {
161161 return item
162162 } )
163163
164+ // TODO: Remove this once only new stuff is indexed
164165 items = items . filter ( ( item ) => {
165166 // Remove old prev-Tailwind plus search results
167+ // @ts -ignore
166168 if ( item . hierarchy ?. lvl0 === "Components" ) {
167169 return false
168170 }
@@ -191,6 +193,16 @@ export function SearchProvider({ children }: React.PropsWithChildren) {
191193
192194 let isTailwindUI = isTailwindPlusURL ( item . url ) ;
193195
196+ if ( isTailwindUI && item . hierarchy . lvl0 === "UI Blocks" ) {
197+ if ( item . hierarchy ?. lvl0 ) {
198+ item . hierarchy . lvl0 = "Components"
199+ }
200+
201+ if ( item . _highlightResult ?. hierarchy ?. lvl0 ?. value ) {
202+ item . _highlightResult . hierarchy . lvl0 . value = "Components"
203+ }
204+ }
205+
194206 return {
195207 ...item ,
196208 hierarchy : {
You can’t perform that action at this time.
0 commit comments