File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,11 @@ export function Home({ hasSearched, setHasSearched }: HomeProps) {
158158 const uniquePricing = Array . from (
159159 new Set ( software . map ( ( sw ) => sw . pricing ) ) ,
160160 ) . sort ( ) ;
161-
161+ useEffect ( ( ) => {
162+ if ( ! hasSearched ) {
163+ setTaskDescription ( "" ) ;
164+ }
165+ } , [ hasSearched ] ) ;
162166 useEffect ( ( ) => {
163167 const fetchSuggestions = debounce ( async ( ) => {
164168 if ( taskDescription . length >= 3 ) {
@@ -171,7 +175,7 @@ export function Home({ hasSearched, setHasSearched }: HomeProps) {
171175 } else {
172176 setDescriptionSuggestions ( [ ] ) ;
173177 }
174- } , 500 ) ; // Wait 500ms before making the API request
178+ } , 500 ) ;
175179
176180 fetchSuggestions ( ) ;
177181
@@ -253,9 +257,7 @@ export function Home({ hasSearched, setHasSearched }: HomeProps) {
253257 layout = "compact"
254258 />
255259
256- { /* Filters Section with Results Summary */ }
257260 < div className = "mb-8 bg-white rounded-lg shadow p-6" >
258- { /* Results Summary */ }
259261 < div className = "flex items-center justify-between mb-6 pb-4 border-b border-gray-200" >
260262 < div className = "flex items-center space-x-6" >
261263 < div className = "flex items-center text-gray-600" >
You can’t perform that action at this time.
0 commit comments