From 486286a29065b3bfaaaf0ae6bde5377cc736badb Mon Sep 17 00:00:00 2001 From: "ryota.sasazawa" Date: Thu, 19 Dec 2024 18:23:05 +0900 Subject: [PATCH] feat: Send openRelatedTablesLogEvent when opening related tables on main area --- frontend/.changeset/dry-islands-flash.md | 6 ++++++ .../TableNode/TableDetail/RelatedTables/RelatedTables.tsx | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 frontend/.changeset/dry-islands-flash.md diff --git a/frontend/.changeset/dry-islands-flash.md b/frontend/.changeset/dry-islands-flash.md new file mode 100644 index 00000000..45e9bdca --- /dev/null +++ b/frontend/.changeset/dry-islands-flash.md @@ -0,0 +1,6 @@ +--- +"@liam-hq/erd-core": patch +"@liam-hq/cli": patch +--- + +📈 : Add open related tables log event diff --git a/frontend/packages/erd-core/src/components/ERDRenderer/ERDContent/TableNode/TableDetail/RelatedTables/RelatedTables.tsx b/frontend/packages/erd-core/src/components/ERDRenderer/ERDContent/TableNode/TableDetail/RelatedTables/RelatedTables.tsx index 0dc6e856..6c4df83a 100644 --- a/frontend/packages/erd-core/src/components/ERDRenderer/ERDContent/TableNode/TableDetail/RelatedTables/RelatedTables.tsx +++ b/frontend/packages/erd-core/src/components/ERDRenderer/ERDContent/TableNode/TableDetail/RelatedTables/RelatedTables.tsx @@ -1,4 +1,5 @@ import { convertDBStructureToNodes } from '@/components/ERDRenderer/convertDBStructureToNodes' +import { OpenRelatedTablesLogEvent } from '@/features/gtm/utils' import { replaceHiddenNodeIds, updateActiveTableName, @@ -33,7 +34,10 @@ export const RelatedTables: FC = ({ table }) => { replaceHiddenNodeIds(hiddenNodeIds) updateActiveTableName(undefined) - }, [nodes, getNodes]) + OpenRelatedTablesLogEvent({ + tableId: table.name, + }) + }, [nodes, getNodes, table.name]) return (