From d8759128059eb62c8e81f828aae950438cf816d7 Mon Sep 17 00:00:00 2001 From: Replit Agent Date: Fri, 5 Jun 2026 20:28:39 +0000 Subject: [PATCH] Remove home page search bar (Task #22) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The home page previously showed a search input + «بحث» button above the featured opportunities. The user asked to remove it so the home page goes straight to the featured opportunities. Changes (artifacts/ehsan-poc/src/pages/home.tsx): - Deleted the search UI block (label, Search-icon input, search button). - Removed the now-unused `query`/`setQuery` state and the client-side filtering; the featured grid now maps over published requests directly via a `featured` list. - Simplified the empty state to always use t.opportunities.noOpportunities (dropped the search-specific noResults branch). - Removed now-unused imports: `Input` and the `Search` lucide icon. `Button` is kept (still used by the hero CTA). Out of scope (unchanged): opportunities page search/filter, header nav. Unused translation keys (home.searchLabel/searchButton/noResults, common.searchPlaceholder) were left in translations.ts as they are shared strings and harmless; no behavioral impact. Verified: tsc --noEmit clean. --- artifacts/ehsan-poc/src/pages/home.tsx | 39 ++++---------------------- 1 file changed, 5 insertions(+), 34 deletions(-) diff --git a/artifacts/ehsan-poc/src/pages/home.tsx b/artifacts/ehsan-poc/src/pages/home.tsx index 6bd34f2..cbdf5e2 100644 --- a/artifacts/ehsan-poc/src/pages/home.tsx +++ b/artifacts/ehsan-poc/src/pages/home.tsx @@ -3,12 +3,11 @@ import { useLanguage } from "../contexts/LanguageContext"; import { useListPublishedRequests } from "@workspace/api-client-react"; import { Card, CardContent } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; -import { Input } from "@/components/ui/input"; import { Skeleton } from "@/components/ui/skeleton"; import { OpportunityCard } from "../components/OpportunityCard"; import { Reveal } from "../components/Reveal"; import { Link } from "wouter"; -import { Search, Pause, Play } from "lucide-react"; +import { Pause, Play } from "lucide-react"; import zakatBanner from "@assets/zakatbanarWEB_1780682994527.png"; import dawriBanner from "@assets/dawribanarWEB_1780682998494.png"; import waqfBanner from "@assets/waqfbanerWEB_1780683002610.png"; @@ -43,7 +42,6 @@ function Ornament({ className = "" }: { className?: string }) { export default function Home() { const { t } = useLanguage(); const { data: published, isLoading: pubLoading } = useListPublishedRequests(); - const [query, setQuery] = useState(""); const [slide, setSlide] = useState(0); const [paused, setPaused] = useState(false); @@ -56,15 +54,7 @@ export default function Home() { return () => clearInterval(id); }, [paused]); - const filtered = (published || []).filter((r) => { - if (!query.trim()) return true; - const q = query.toLowerCase(); - return ( - r.caseId.toLowerCase().includes(q) || - r.description.toLowerCase().includes(q) || - r.beneficiaryName.toLowerCase().includes(q) - ); - }); + const featured = published || []; return ( <> @@ -150,36 +140,17 @@ export default function Home() {
{/* Featured Opportunities */}
- {/* Search */} -
- -
-
- - setQuery(e.target.value)} - data-testid="input-search" - /> -
- -
-
- {pubLoading ? (
{[1, 2, 3].map((i) => )}
- ) : filtered.length === 0 ? ( + ) : featured.length === 0 ? (
- {query.trim() ? t.home.noResults : t.opportunities.noOpportunities} + {t.opportunities.noOpportunities}
) : (
- {filtered.slice(0, 6).map((request, i) => ( + {featured.slice(0, 6).map((request, i) => (