From 640eb750b99021dcdd35b7ac2af25f1b1d6f8f49 Mon Sep 17 00:00:00 2001 From: Eliezer Steinbock <3090527+elie222@users.noreply.github.com> Date: Wed, 26 Nov 2025 13:53:33 -0500 Subject: [PATCH 1/2] use nuqs --- .../assistant/RulesSelect.tsx | 30 +++++++------------ apps/web/app/(marketing) | 2 +- version.txt | 2 +- 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/apps/web/app/(app)/[emailAccountId]/assistant/RulesSelect.tsx b/apps/web/app/(app)/[emailAccountId]/assistant/RulesSelect.tsx index 0e11cae440..b5bd3bfd24 100644 --- a/apps/web/app/(app)/[emailAccountId]/assistant/RulesSelect.tsx +++ b/apps/web/app/(app)/[emailAccountId]/assistant/RulesSelect.tsx @@ -8,25 +8,20 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; -import { useSearchParams, useRouter } from "next/navigation"; +import { parseAsString, useQueryState } from "nuqs"; import { ChevronDown, Tag } from "lucide-react"; export function RulesSelect() { const { data, isLoading, error } = useRules(); - const searchParams = useSearchParams(); - const router = useRouter(); - const currentValue = searchParams.get("ruleId") || "all"; - - const handleValueChange = (value: string) => { - const params = new URLSearchParams(searchParams.toString()); - params.set("ruleId", value); - router.push(`?${params.toString()}`); - }; + const [ruleId, setRuleId] = useQueryState( + "ruleId", + parseAsString.withDefault("all"), + ); const getCurrentLabel = () => { - if (currentValue === "all") return "All rules"; - if (currentValue === "skipped") return "No match"; - return data?.find((rule) => rule.id === currentValue)?.name || "All rules"; + if (ruleId === "all") return "All rules"; + if (ruleId === "skipped") return "No match"; + return data?.find((rule) => rule.id === ruleId)?.name || "All rules"; }; return ( @@ -48,17 +43,14 @@ export function RulesSelect() { - handleValueChange("all")}> + setRuleId("all")}> All rules - handleValueChange("skipped")}> + setRuleId("skipped")}> No match {data?.map((rule) => ( - handleValueChange(rule.id)} - > + setRuleId(rule.id)}> {rule.name} ))} diff --git a/apps/web/app/(marketing) b/apps/web/app/(marketing) index 59a58a16c6..c43ec804e5 160000 --- a/apps/web/app/(marketing) +++ b/apps/web/app/(marketing) @@ -1 +1 @@ -Subproject commit 59a58a16c6883d926337bc5a56f7ebd9ce2a2dcb +Subproject commit c43ec804e5255bb6fc4712956a04570ef7825bff diff --git a/version.txt b/version.txt index 41f29001cd..8286cf87c3 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v2.21.0 +v2.21.1 From c5d5235fa0b654cb1712f30f3fe21c04719ad090 Mon Sep 17 00:00:00 2001 From: Eliezer Steinbock <3090527+elie222@users.noreply.github.com> Date: Wed, 26 Nov 2025 13:57:15 -0500 Subject: [PATCH 2/2] make action bar mobile responsive --- apps/web/app/(app)/[emailAccountId]/stats/ActionBar.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/web/app/(app)/[emailAccountId]/stats/ActionBar.tsx b/apps/web/app/(app)/[emailAccountId]/stats/ActionBar.tsx index 841ed8cd97..14c59b2392 100644 --- a/apps/web/app/(app)/[emailAccountId]/stats/ActionBar.tsx +++ b/apps/web/app/(app)/[emailAccountId]/stats/ActionBar.tsx @@ -14,12 +14,14 @@ export function ActionBar({ return (
-
{children}
-
{rightContent}
+
{children}
+ {rightContent && ( +
{rightContent}
+ )}
); }