-
{providerAlias}
-
{providerId}
+
+
+
+
{getProviderLogo()}
+
{getIcon()}
+
+ {providerAlias}
+ {/* */}
+
diff --git a/components/providers/SnippetIdProvider.tsx b/components/providers/SnippetIdProvider.tsx
new file mode 100644
index 0000000000..775e72eaf7
--- /dev/null
+++ b/components/providers/SnippetIdProvider.tsx
@@ -0,0 +1,28 @@
+import { Snippet } from "@nextui-org/react";
+import React from "react";
+
+import { CopyIcon, DoneIcon, IdIcon } from "../icons";
+
+interface SnippetIdProviderProps {
+ providerId: string;
+}
+export const SnippetIdProvider: React.FC
= ({
+ providerId,
+}) => {
+ return (
+ }
+ checkIcon={}
+ >
+
+
+ {providerId}
+
+
+ );
+};
diff --git a/components/providers/index.ts b/components/providers/index.ts
index 58c8dae90f..a0129d3520 100644
--- a/components/providers/index.ts
+++ b/components/providers/index.ts
@@ -7,6 +7,7 @@ export * from "./DateWithTime";
export * from "./DeleteProvider";
export * from "./ProviderInfo";
export * from "./ScanStatus";
+export * from "./SnippetIdProvider";
export * from "./table/ColumnsProvider";
export * from "./table/DataTableColumnHeader";
export * from "./table/DataTablePagination";
diff --git a/components/providers/table/ColumnsProvider.tsx b/components/providers/table/ColumnsProvider.tsx
index e08050e620..33c79a25bd 100644
--- a/components/providers/table/ColumnsProvider.tsx
+++ b/components/providers/table/ColumnsProvider.tsx
@@ -31,12 +31,14 @@ import {
EditDocumentBulkIcon,
} from "@nextui-org/shared-icons";
+import { SnippetIdProvider } from "../SnippetIdProvider";
+
const iconClasses =
"text-2xl text-default-500 pointer-events-none flex-shrink-0";
export const ColumnsProvider: ColumnDef[] = [
{
- header: "ID",
+ header: "n",
cell: ({ row }) => {row.index + 1}
,
},
{
@@ -46,18 +48,29 @@ export const ColumnsProvider: ColumnDef[] = [
),
cell: ({ row }) => {
const {
- attributes: { connection, provider, alias, provider_id },
+ attributes: { connection, provider, alias },
} = getProviderData(row);
return (
);
},
},
+ {
+ accessorKey: "id",
+ header: ({ column }) => (
+
+ ),
+ cell: ({ row }) => {
+ const {
+ attributes: { provider_id },
+ } = getProviderData(row);
+ return ;
+ },
+ },
{
accessorKey: "status",
header: "Scan Status",
@@ -144,6 +157,7 @@ export const ColumnsProvider: ColumnDef[] = [
key="new"
description="Check the connection to the provider"
shortcut="⌘N"
+ textValue="Check Connection"
startContent={}
>
@@ -152,6 +166,7 @@ export const ColumnsProvider: ColumnDef[] = [
key="edit"
description="Allows you to edit the provider"
shortcut="⌘⇧E"
+ textValue="Edit Provider"
startContent={
}
diff --git a/components/ui/custom/CustomLoader.tsx b/components/ui/custom/CustomLoader.tsx
new file mode 100644
index 0000000000..4dd67b6e78
--- /dev/null
+++ b/components/ui/custom/CustomLoader.tsx
@@ -0,0 +1,16 @@
+"use client";
+
+import { useEffect, useState } from "react";
+
+export const CustomLoader = (props: { size?: "small" }) => {
+ const [loadingSpinner, setloadingSpinner] = useState(0);
+ const loadingChars = "|/-\\";
+
+ const textClasses = `w-xs px-xs ${props.size === "small" ? "!text-s" : ""}`;
+
+ useEffect(() => {
+ setTimeout(() => setloadingSpinner(loadingSpinner + 1), 150);
+ }, [loadingSpinner]);
+
+ return {loadingChars[loadingSpinner % 4]}
;
+};
diff --git a/components/ui/custom/index.ts b/components/ui/custom/index.ts
index dbc111a3cc..1599c7850f 100644
--- a/components/ui/custom/index.ts
+++ b/components/ui/custom/index.ts
@@ -1,3 +1,4 @@
export * from "./CustomBox";
export * from "./CustomButtonClientAction";
export * from "./CustomInput";
+export * from "./CustomLoader";
diff --git a/hooks/index.ts b/hooks/index.ts
index b32251b922..709aadd864 100644
--- a/hooks/index.ts
+++ b/hooks/index.ts
@@ -1,2 +1 @@
-export * from "./useDebounce";
export * from "./useLocalStorage";
diff --git a/hooks/useDebounce.ts b/hooks/useDebounce.ts
deleted file mode 100644
index f0d8d7c3bf..0000000000
--- a/hooks/useDebounce.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { useEffect, useState } from "react";
-
-export function useDebounce(value: T, delay?: number): T {
- const [debouncedValue, setDebouncedValue] = useState(value);
-
- useEffect(() => {
- const timer = setTimeout(() => setDebouncedValue(value), delay ?? 900);
-
- return () => {
- clearTimeout(timer);
- };
- }, [value, delay]);
-
- return debouncedValue;
-}