- {templatesList.map((template) => (
+ {dashboardTemplates.map((template) => (
{
+ const searchValueLowerCase = searchValue?.toLowerCase();
+
+ return dashboardList.filter((item: DashboardTemplate) => {
+ const { name } = item;
+
+ // Check if any property value contains the searchValue
+ return name.toLowerCase().includes(searchValueLowerCase);
+ });
+};
diff --git a/frontend/src/types/api/dashboard/getAll.ts b/frontend/src/types/api/dashboard/getAll.ts
index e7faf83023..53e2ca31a7 100644
--- a/frontend/src/types/api/dashboard/getAll.ts
+++ b/frontend/src/types/api/dashboard/getAll.ts
@@ -54,6 +54,14 @@ export interface Dashboard {
isLocked?: boolean;
}
+export interface DashboardTemplate {
+ name: string;
+ icon: React.ReactElement;
+ id: string;
+ description: string;
+ previewImage: string;
+}
+
export interface DashboardData {
uuid?: string;
description?: string;