From b76ce31f2305e60be6eab99a1a51ba0ac60cbab5 Mon Sep 17 00:00:00 2001 From: nael Date: Mon, 20 May 2024 18:02:20 +0200 Subject: [PATCH 1/2] :green_heart: Fix build --- .../src/components/Configuration/FieldMappings/columns.tsx | 2 +- .../src/components/shared/data-table-row-actions.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/client-ts/src/components/Configuration/FieldMappings/columns.tsx b/apps/client-ts/src/components/Configuration/FieldMappings/columns.tsx index a53ee5b9a..a2b432687 100644 --- a/apps/client-ts/src/components/Configuration/FieldMappings/columns.tsx +++ b/apps/client-ts/src/components/Configuration/FieldMappings/columns.tsx @@ -141,6 +141,6 @@ export const columns: ColumnDef[] = [ }, { id: "actions", - cell: ({ row }) => , + cell: ({ row }) => , }, ] \ No newline at end of file diff --git a/apps/client-ts/src/components/shared/data-table-row-actions.tsx b/apps/client-ts/src/components/shared/data-table-row-actions.tsx index 952079b44..e442df7f8 100644 --- a/apps/client-ts/src/components/shared/data-table-row-actions.tsx +++ b/apps/client-ts/src/components/shared/data-table-row-actions.tsx @@ -16,7 +16,7 @@ import useDeleteWebhook from "@/hooks/delete/useDeleteWebhook" interface DataTableRowActionsProps { row: Row; - object: "webhook" | "api-key" + object: "webhook" | "api-key" | "field-mapping" } export function DataTableRowActions({ @@ -38,7 +38,9 @@ export function DataTableRowActions({ removeApiKey({ id_api_key: row.original.id_api_key }) - break; + break; + default: + break; } } From 507b16a3d45dfb6660ec57ad4f54cca8847e6b1e Mon Sep 17 00:00:00 2001 From: nael Date: Mon, 20 May 2024 18:15:41 +0200 Subject: [PATCH 2/2] :green_heart: Fix ci --- .../src/app/(Dashboard)/b2c/profile/page.tsx | 25 ++++++++++++++++--- .../shared/data-table-row-actions.tsx | 4 +-- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/apps/client-ts/src/app/(Dashboard)/b2c/profile/page.tsx b/apps/client-ts/src/app/(Dashboard)/b2c/profile/page.tsx index 6bfd9fd9b..e902452a0 100644 --- a/apps/client-ts/src/app/(Dashboard)/b2c/profile/page.tsx +++ b/apps/client-ts/src/app/(Dashboard)/b2c/profile/page.tsx @@ -15,15 +15,27 @@ import Cookies from 'js-cookie'; import useProfileStore from "@/state/profileStore"; import useProjectStore from "@/state/projectStore" import { useQueryClient } from '@tanstack/react-query'; +import { useState } from "react"; const Profile = () => { + const [copied, setCopied] = useState(false); const { profile, setProfile } = useProfileStore(); const { setIdProject } = useProjectStore(); const queryClient = useQueryClient(); const router = useRouter(); + const handleCopy = async (email: string) => { + try { + await navigator.clipboard.writeText(email) + setCopied(true); + setTimeout(() => setCopied(false), 2000); // Reset copied state after 2 seconds + } catch (err) { + console.error('Failed to copy: ', err); + } + }; + const onLogout = () => { router.push('/b2c/login') Cookies.remove("access_token") @@ -33,7 +45,7 @@ const Profile = () => { } return ( -
+
Profile @@ -48,13 +60,18 @@ const Profile = () => {
-
-
diff --git a/apps/client-ts/src/components/shared/data-table-row-actions.tsx b/apps/client-ts/src/components/shared/data-table-row-actions.tsx index e442df7f8..07f035a17 100644 --- a/apps/client-ts/src/components/shared/data-table-row-actions.tsx +++ b/apps/client-ts/src/components/shared/data-table-row-actions.tsx @@ -31,12 +31,12 @@ export function DataTableRowActions({ switch(object) { case 'webhook': removeWebhook({ - id_webhook: row.original.id_webhook_endpoint + id_webhook: (row.original as any).id_webhook_endpoint }) break; case 'api-key': removeApiKey({ - id_api_key: row.original.id_api_key + id_api_key: (row.original as any).id_api_key }) break; default: