File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
src/components/Layer2NetworksTable/hooks Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -11,16 +11,34 @@ import { TwImage } from "@/components/Image"
11
11
import NetworkMaturityTooltip from "@/components/Layer2NetworksTable/NetworkMaturityTooltip"
12
12
import InlineLink from "@/components/Link"
13
13
import Tooltip from "@/components/Tooltip"
14
+ import { Button } from "@/components/ui/buttons/Button"
14
15
import { TableCell , TableHead } from "@/components/ui/Table"
15
16
16
17
import { cn } from "@/lib/utils/cn"
18
+ import { trackCustomEvent } from "@/lib/utils/matomo"
17
19
18
20
export const useNetworkColumns : ColumnDef < ExtendedRollup > [ ] = [
19
21
{
20
22
id : "l2Info" ,
21
23
header : ( { table } ) => {
24
+ const meta = table . options . meta as TableMeta
25
+
22
26
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 >
24
42
< p >
25
43
Networks showing < strong > ({ table . options . data . length } )</ strong >
26
44
</ p >
You can’t perform that action at this time.
0 commit comments