Skip to content

Commit 41128cd

Browse files
committed
Merge Develop into main
2 parents e57c597 + f882a29 commit 41128cd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/pages/Home.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff 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">

0 commit comments

Comments
 (0)