Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(tags): no_op tag mention click when not authed (#5357)

Seamus53b7e562e608
diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/TagMention.tsx b/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/TagMention.tsx
index df5241181b..24d1c2dddb 100644
--- a/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/TagMention.tsx
+++ b/apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/TagMention.tsx
@@ -1,5 +1,6 @@
import { useSplitLayout } from '@components/app/split-layout/layout';
import { useSplitPanel } from '@components/app/split-layout/layoutUtils';
+import { useIsAuthenticated } from '@core/auth';
import {
$isTagMentionNode,
type TagMentionDecoratorProps,
@@ -38,6 +39,7 @@ export function TagMention(props: TagMentionDecoratorProps) {
const tagsQuery = useTagsQuery();
const split = useSplitLayout();
const panel = useSplitPanel();
+ const isAuthenticated = useIsAuthenticated();
const isSelectedAsNode = createMemo(() => {
const sel = selection();
@@ -88,6 +90,8 @@ export function TagMention(props: TagMentionDecoratorProps) {
});
const open = () => {
+ if (isAuthenticated() !== true) return;
+
const tag = resolvedTag();
navigateToTag(split.openWithSplit, tag, { handle: panel?.handle });
};