Refactor: Remove unnecessary eslint-disable comments and improve code clarity in data grid components and hooks
quality / commitlint (push) Skipped
quality / changes (push) Successful in 5s
quality / api (push) Skipped
quality / docker-check (push) Skipped
CD / update-wiki (push) Successful in 3s
quality / web (push) Successful in 41s
CD / quality (push) Successful in 51s
CD / publish (push) Successful in 26s
quality / commitlint (push) Skipped
quality / changes (push) Successful in 5s
quality / api (push) Skipped
quality / docker-check (push) Skipped
CD / update-wiki (push) Successful in 3s
quality / web (push) Successful in 41s
CD / quality (push) Successful in 51s
CD / publish (push) Successful in 26s
This commit is contained in:
@@ -258,7 +258,6 @@ function DataGridColumnHeaderInner<TData, TValue>({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return items
|
return items
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
||||||
}, [
|
}, [
|
||||||
filter,
|
filter,
|
||||||
canSort,
|
canSort,
|
||||||
|
|||||||
@@ -464,10 +464,8 @@ function DataGridTableBase({ children }: { children: ReactNode }) {
|
|||||||
colSizes[`--col-${header.column.id}-size`] = header.column.getSize()
|
colSizes[`--col-${header.column.id}-size`] = header.column.getSize()
|
||||||
}
|
}
|
||||||
return colSizes
|
return colSizes
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
||||||
}, [
|
}, [
|
||||||
props.tableLayout?.columnsResizable,
|
props.tableLayout?.columnsResizable,
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
||||||
table.getState().columnSizing,
|
table.getState().columnSizing,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import {
|
|||||||
import { cn } from "@cdnmanager/ui/lib/utils"
|
import { cn } from "@cdnmanager/ui/lib/utils"
|
||||||
|
|
||||||
declare module "@tanstack/react-table" {
|
declare module "@tanstack/react-table" {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
interface ColumnMeta<TData extends RowData, TValue> {
|
interface ColumnMeta<TData extends RowData, TValue> {
|
||||||
headerTitle?: string
|
headerTitle?: string
|
||||||
headerClassName?: string
|
headerClassName?: string
|
||||||
@@ -108,7 +107,6 @@ export interface DataGridProps<TData extends object> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const DataGridContext = createContext<
|
const DataGridContext = createContext<
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
||||||
DataGridContextProps<any> | undefined
|
DataGridContextProps<any> | undefined
|
||||||
>(undefined)
|
>(undefined)
|
||||||
|
|
||||||
@@ -145,7 +143,6 @@ function DataGridProvider<TData extends object>({
|
|||||||
recordCount: props.recordCount,
|
recordCount: props.recordCount,
|
||||||
isLoading: props.isLoading || false,
|
isLoading: props.isLoading || false,
|
||||||
}),
|
}),
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
||||||
[
|
[
|
||||||
table,
|
table,
|
||||||
props.recordCount,
|
props.recordCount,
|
||||||
@@ -157,9 +154,7 @@ function DataGridProvider<TData extends object>({
|
|||||||
props.emptyMessage,
|
props.emptyMessage,
|
||||||
props.onRowClick,
|
props.onRowClick,
|
||||||
props.className,
|
props.className,
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
||||||
JSON.stringify(props.tableLayout),
|
JSON.stringify(props.tableLayout),
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
||||||
JSON.stringify(props.tableClassNames),
|
JSON.stringify(props.tableClassNames),
|
||||||
tableState.sorting,
|
tableState.sorting,
|
||||||
tableState.pagination,
|
tableState.pagination,
|
||||||
|
|||||||
@@ -272,6 +272,7 @@ export const useFileUpload = (
|
|||||||
clearFiles,
|
clearFiles,
|
||||||
onFilesChange,
|
onFilesChange,
|
||||||
onFilesAdded,
|
onFilesAdded,
|
||||||
|
onError,
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,9 @@ export function dedupeBreadcrumbs(crumbs: BreadcrumbCrumb[]): BreadcrumbCrumb[]
|
|||||||
|
|
||||||
export function getBreadcrumbs(
|
export function getBreadcrumbs(
|
||||||
pathname: string,
|
pathname: string,
|
||||||
_dynamicLabels: Record<string, string> = {},
|
dynamicLabels: Record<string, string> = {},
|
||||||
): BreadcrumbCrumb[] {
|
): BreadcrumbCrumb[] {
|
||||||
|
void dynamicLabels
|
||||||
const path = pathname.replace(/\/+$/, '') || '/'
|
const path = pathname.replace(/\/+$/, '') || '/'
|
||||||
|
|
||||||
if (path === '/') {
|
if (path === '/') {
|
||||||
|
|||||||
Reference in New Issue
Block a user