diff --git a/src/app/explore/ExplorePageClient.tsx b/src/app/explore/ExplorePageClient.tsx index 5e15fe0..695f5e4 100644 --- a/src/app/explore/ExplorePageClient.tsx +++ b/src/app/explore/ExplorePageClient.tsx @@ -9,6 +9,7 @@ import { Footer } from "@/components/Footer"; import { IntentStatusBadge } from "@/components/IntentStatusBadge"; import { SkeletonCard } from "@/components/Skeleton"; import { useLiveIntents } from "@/hooks/useLiveIntents"; +import { useTranslation } from "@/lib/i18n/I18nProvider"; import { timeAgo } from "@/lib/time"; import { CHAINS } from "@/lib/marketData"; import { sanitizeDisplayText } from "@/lib/textSafety"; @@ -32,6 +33,7 @@ function readSort(value: string | null): SortOption { } export default function ExplorePageClient() { + const { t } = useTranslation(); const { intents, isLoading, error, isLive } = useLiveIntents(); const router = useRouter(); const pathname = usePathname(); @@ -55,6 +57,13 @@ export default function ExplorePageClient() { const setChainFilter = (value: string) => updateQuery({ chain: value }); const setSort = (value: SortOption) => updateQuery({ sort: value }); + const isFiltered = statusFilter !== "all" || chainFilter !== "all"; + + const clearFilters = () => { + setStatusFilter("all"); + setChainFilter("all"); + }; + const filtered = useMemo(() => { let result = intents; if (statusFilter !== "all") { @@ -102,7 +111,7 @@ export default function ExplorePageClient() {
{t("explore.error.title")}
+{t("explore.error.message")}
{t("explore.empty.title")}
+{t("explore.empty.message")}
+ {isFiltered && ( + + )}