Skip to content

Commit ccc93fe

Browse files
committed
filters button mobile view
1 parent d5a57a2 commit ccc93fe

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/components/Layer2NetworksTable/hooks/useNetworkColumns.tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,34 @@ import { TwImage } from "@/components/Image"
1111
import NetworkMaturityTooltip from "@/components/Layer2NetworksTable/NetworkMaturityTooltip"
1212
import InlineLink from "@/components/Link"
1313
import Tooltip from "@/components/Tooltip"
14+
import { Button } from "@/components/ui/buttons/Button"
1415
import { TableCell, TableHead } from "@/components/ui/Table"
1516

1617
import { cn } from "@/lib/utils/cn"
18+
import { trackCustomEvent } from "@/lib/utils/matomo"
1719

1820
export const useNetworkColumns: ColumnDef<ExtendedRollup>[] = [
1921
{
2022
id: "l2Info",
2123
header: ({ table }) => {
24+
const meta = table.options.meta as TableMeta
25+
2226
return (
23-
<TableHead className="flex-1">
27+
<TableHead className="flex w-full flex-row items-center justify-between px-4 py-2">
28+
<Button
29+
variant="ghost"
30+
className="block p-0 lg:hidden"
31+
onClick={() => {
32+
trackCustomEvent({
33+
eventCategory: "MobileFilterToggle",
34+
eventAction: "Tap MobileFilterToggle - sticky",
35+
eventName: "show mobile filters true",
36+
})
37+
meta.setMobileFiltersOpen(true)
38+
}}
39+
>
40+
<p className="text-md">{`Filters (${meta.activeFiltersCount})`}</p>
41+
</Button>
2442
<p>
2543
Networks showing <strong>({table.options.data.length})</strong>
2644
</p>

0 commit comments

Comments
 (0)