Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Fix Deal list error

Gildas Garcia2aa5343f0c71
diff --git a/src/components/admin/list.tsx b/src/components/admin/list.tsx
index c758b078..2c1b0ff5 100644
--- a/src/components/admin/list.tsx
+++ b/src/components/admin/list.tsx
@@ -5,6 +5,7 @@ import {
} from "@/components/admin/breadcrumb";
import type { ListBaseProps, RaRecord } from "ra-core";
import {
+ FilterContext,
ListBase,
type ListControllerResult,
Translate,
@@ -17,7 +18,6 @@ import type { ReactElement, ReactNode } from "react";
import { Link } from "react-router";
import { cn } from "@/lib/utils";
import type { FilterElementProps } from "@/hooks/filter-context";
-import { FilterContext } from "@/hooks/filter-context";
import { CreateButton } from "@/components/admin/create-button";
import { ExportButton } from "@/components/admin/export-button";
import { ListPagination } from "@/components/admin/list-pagination";
diff --git a/src/hooks/filter-context.tsx b/src/hooks/filter-context.tsx
deleted file mode 100644
index 2b5d9aeb..00000000
--- a/src/hooks/filter-context.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-import * as React from "react";
-import { useContext } from "react";
-
-export interface FilterElementProps {
- alwaysOn?: boolean;
- context?: string;
-
- defaultValue?: any;
- resource?: string;
- record?: object;
- source: string;
-
- [key: string]: any; // Allow any other prop
-}
-
-export type FilterContextType =
- | React.ReactElement<FilterElementProps>[]
- | undefined;
-
-/**
- * Make filters accessible to sub components
- * @deprecated Use FilterContext from `ra-core` once available.
- */
-export const FilterContext = React.createContext<FilterContextType>(undefined);
-
-/**
- * @deprecated Use useFilterContext from `ra-core` once available.
- */
-export const useFilterContext = (): FilterContextType => {
- return useContext(FilterContext);
-};