fix: stats on /insights/routing (#18985)

* fix: replace filter implementation on /insights/routing

* remove unused functions

* fix type error

* refactor: extract insights parameters

* remove FiltersProvider
This commit is contained in:
Eunjae Lee authored and GitHub committed 2025-01-31 17:16:53 +01:00
1 parent 195e645f24
commit fdc8e084ea
16 files changed
+357 -327

No files matched your search

@@ -114,6 +114,19 @@ export function DataTable<TData, TValue>({
...rest.style,
}}
data-testid={testId ?? "data-table"}>
{/*
Invalidate left & right properties for <= sm screen size,
because we pin columns only for >= sm screen sizes.
*/}
<style jsx global>{`
@media (max-width: 640px) {
.data-table th,
.data-table td {
left: initial !important;
right: initial !important;
}
}
`}</style>
<div
ref={tableContainerRef}
onScroll={onScroll}
@@ -124,7 +137,7 @@ export function DataTable<TData, TValue>({
)}
style={{ gridArea: "body" }}>
<TableNew
className="grid border-0"
className="data-table grid border-0"
style={{
...columnSizingVars,
...(Boolean(enableColumnResizing) && { width: table.getTotalSize() }),
@@ -135,7 +148,6 @@ export function DataTable<TData, TValue>({
<TableRow key={headerGroup.id} className="hover:bg-subtle flex w-full">
{headerGroup.headers.map((header) => {
const { column } = header;
const meta = column.columnDef.meta;
return (
<TableHead
key={header.id}
@@ -84,7 +84,7 @@ export function DataTableWrapper<TData, TValue>({
className={className}
containerClassName={containerClassName}
onScroll={(e) => fetchMoreOnBottomReached(e.target as HTMLDivElement)}>
{(ToolbarLeft || ToolbarRight) && (
{(ToolbarLeft || ToolbarRight || children) && (
<DataTableToolbar.Root>
<div className="flex w-full flex-col gap-2">
<div className="flex w-full flex-wrap justify-between gap-2">