File tree 1 file changed +24
-24
lines changed
src/components/GenerateRoadmap
1 file changed +24
-24
lines changed Original file line number Diff line number Diff line change @@ -128,32 +128,32 @@ export function AITermSuggestionInput(props: AITermSuggestionInputProps) {
128
128
return allRoadmaps ;
129
129
} ;
130
130
131
- useEffect ( ( ) => {
132
- if ( debouncedSearchValue . length === 0 || isFirstRender . current ) {
133
- setSearchResults ( [ ] ) ;
134
- return ;
135
- }
131
+ // useEffect(() => {
132
+ // if (debouncedSearchValue.length === 0 || isFirstRender.current) {
133
+ // setSearchResults([]);
134
+ // return;
135
+ // }
136
136
137
- setIsActive ( true ) ;
138
- setIsLoading ( true ) ;
139
- loadTopAIRoadmapTerm ( )
140
- . then ( ( results ) => {
141
- const normalizedSearchText = debouncedSearchValue . trim ( ) . toLowerCase ( ) ;
142
- const matchingOfficialRoadmaps = officialRoadmaps . filter ( ( roadmap ) => {
143
- return (
144
- roadmap . title . toLowerCase ( ) . indexOf ( normalizedSearchText ) !== - 1
145
- ) ;
146
- } ) ;
137
+ // setIsActive(true);
138
+ // setIsLoading(true);
139
+ // loadTopAIRoadmapTerm()
140
+ // .then((results) => {
141
+ // const normalizedSearchText = debouncedSearchValue.trim().toLowerCase();
142
+ // const matchingOfficialRoadmaps = officialRoadmaps.filter((roadmap) => {
143
+ // return (
144
+ // roadmap.title.toLowerCase().indexOf(normalizedSearchText) !== -1
145
+ // );
146
+ // });
147
147
148
- setSearchResults (
149
- [ ...matchingOfficialRoadmaps , ...results ] ?. slice ( 0 , 5 ) || [ ] ,
150
- ) ;
151
- setActiveCounter ( 0 ) ;
152
- } )
153
- . finally ( ( ) => {
154
- setIsLoading ( false ) ;
155
- } ) ;
156
- } , [ debouncedSearchValue ] ) ;
148
+ // setSearchResults(
149
+ // [...matchingOfficialRoadmaps, ...results]?.slice(0, 5) || [],
150
+ // );
151
+ // setActiveCounter(0);
152
+ // })
153
+ // .finally(() => {
154
+ // setIsLoading(false);
155
+ // });
156
+ // }, [debouncedSearchValue]);
157
157
158
158
useEffect ( ( ) => {
159
159
if ( isFirstRender . current ) {
You can’t perform that action at this time.
0 commit comments