@@ -76,7 +76,6 @@ type ComponentLibraryContextType = {
7676 existingComponentLibraries : StoredLibrary [ ] | undefined ;
7777 searchResult : SearchResult | null ;
7878
79- highlightedComponentDigest : string | null ;
8079 searchComponentLibrary : (
8180 search : string ,
8281 filters : string [ ] ,
@@ -88,14 +87,12 @@ type ComponentLibraryContextType = {
8887 refetchLibrary : ( ) => void ;
8988 refetchUserComponents : ( ) => void ;
9089
91- setHighlightedComponentDigest : ( digest : string | null ) => void ;
9290 setComponentFavorite : (
9391 component : ComponentReference ,
9492 favorited : boolean ,
9593 ) => void ;
9694 checkIfUserComponent : ( component : ComponentReference ) => boolean ;
9795 checkLibraryContainsComponent : ( component : ComponentReference ) => boolean ;
98- checkIfHighlighted : ( component : ComponentReference ) => boolean ;
9996
10097 getComponentLibrary : ( libraryName : AvailableComponentLibraries ) => Library ;
10198} ;
@@ -179,10 +176,6 @@ export const ComponentLibraryProvider = ({
179176 const [ userComponentsFolder , setUserComponentsFolder ] =
180177 useState < ComponentFolder > ( ) ;
181178
182- const [ highlightedComponentDigest , setHighlightedComponentDigest ] = useState <
183- string | null
184- > ( null ) ;
185-
186179 const [ existingComponent , setExistingComponent ] =
187180 useState < UserComponent | null > ( null ) ;
188181 const [ newComponent , setNewComponent ] =
@@ -365,13 +358,6 @@ export const ComponentLibraryProvider = ({
365358 [ componentLibrary , checkIfUserComponent ] ,
366359 ) ;
367360
368- const checkIfHighlighted = useCallback (
369- ( component : ComponentReference ) => {
370- return component . digest === highlightedComponentDigest ;
371- } ,
372- [ highlightedComponentDigest ] ,
373- ) ;
374-
375361 /**
376362 * Local component library search
377363 */
@@ -602,19 +588,16 @@ export const ComponentLibraryProvider = ({
602588 isLoading,
603589 error,
604590 searchResult,
605- highlightedComponentDigest,
606591 existingComponentLibraries,
607592 searchComponentLibrary,
608593 getComponentLibrary,
609594 addToComponentLibrary,
610595 removeFromComponentLibrary,
611596 refetchLibrary,
612597 refetchUserComponents,
613- setHighlightedComponentDigest,
614598 setComponentFavorite,
615599 checkIfUserComponent,
616600 checkLibraryContainsComponent,
617- checkIfHighlighted,
618601 } ) ,
619602 [
620603 componentLibrary ,
@@ -624,19 +607,16 @@ export const ComponentLibraryProvider = ({
624607 isLoading ,
625608 error ,
626609 searchResult ,
627- highlightedComponentDigest ,
628610 existingComponentLibraries ,
629611 searchComponentLibrary ,
630612 getComponentLibrary ,
631613 addToComponentLibrary ,
632614 removeFromComponentLibrary ,
633615 refetchLibrary ,
634616 refetchUserComponents ,
635- setHighlightedComponentDigest ,
636617 setComponentFavorite ,
637618 checkIfUserComponent ,
638619 checkLibraryContainsComponent ,
639- checkIfHighlighted ,
640620 ] ,
641621 ) ;
642622
0 commit comments