From ce1e147564d70d525c7f6e331e71d756b6aa0e88 Mon Sep 17 00:00:00 2001 From: Jules Date: Thu, 1 Aug 2024 10:50:49 +0200 Subject: [PATCH] [front] - refactor: replace Table with DataTable in public-urls component - Transition from Table to DataTable for consistent component use across the platform - Update corresponding TableData.Cell to DataTable.Cell to align with the new DataTable component usage --- .../builder/data-sources/public-urls.tsx | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/front/pages/w/[wId]/builder/data-sources/public-urls.tsx b/front/pages/w/[wId]/builder/data-sources/public-urls.tsx index eb1aa81f63c0..c319ea475e32 100644 --- a/front/pages/w/[wId]/builder/data-sources/public-urls.tsx +++ b/front/pages/w/[wId]/builder/data-sources/public-urls.tsx @@ -1,13 +1,12 @@ import { Button, + DataTable, LinkIcon, Page, PlusIcon, Popup, RobotIcon, Searchbar, - Table, - TableData, } from "@dust-tt/sparkle"; import { GlobeAltIcon } from "@dust-tt/sparkle"; import type { PlanType, SubscriptionType } from "@dust-tt/types"; @@ -220,10 +219,9 @@ export default function DataSourcesView({ /> )} {clickableDataSources.length > 0 && ( - @@ -247,24 +245,24 @@ function getTableColumns() { header: "Name", accessorKey: "name", cell: (info: Info) => ( - + {info.row.original.name} - + ), }, { header: "Used by", accessorKey: "usage", cell: (info: Info) => ( - + {info.row.original.usage} - + ), }, { header: "Added by", cell: (info: Info) => ( - ), @@ -273,13 +271,13 @@ function getTableColumns() { header: "Last updated", accessorKey: "editedByUser.editedAt", cell: (info: Info) => ( - + {info.row.original.editedByUser?.editedAt ? new Date( info.row.original.editedByUser.editedAt ).toLocaleDateString() : null} - + ), }, ];