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) {
161
161
return item
162
162
} )
163
163
164
+ // TODO: Remove this once only new stuff is indexed
164
165
items = items . filter ( ( item ) => {
165
166
// Remove old prev-Tailwind plus search results
167
+ // @ts -ignore
166
168
if ( item . hierarchy ?. lvl0 === "Components" ) {
167
169
return false
168
170
}
@@ -191,6 +193,16 @@ export function SearchProvider({ children }: React.PropsWithChildren) {
191
193
192
194
let isTailwindUI = isTailwindPlusURL ( item . url ) ;
193
195
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
+
194
206
return {
195
207
...item ,
196
208
hierarchy : {
You can’t perform that action at this time.
0 commit comments