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/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..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 @@ -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({ @@ -31,14 +31,16 @@ 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; + break; + default: + break; } }