Skip to content

Commit 8878d04

Browse files
committed
Remove autocomplete from ai roadmap search
1 parent 1085c33 commit 8878d04

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

src/components/GenerateRoadmap/AITermSuggestionInput.tsx

+24-24
Original file line numberDiff line numberDiff line change
@@ -128,32 +128,32 @@ export function AITermSuggestionInput(props: AITermSuggestionInputProps) {
128128
return allRoadmaps;
129129
};
130130

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+
// }
136136

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+
// });
147147

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]);
157157

158158
useEffect(() => {
159159
if (isFirstRender.current) {

0 commit comments

Comments
 (0)