MCPcopy Create free account
hub / github.com/dailydotdev/apps / logTab

Function logTab

packages/shared/src/components/shell/ShellCluster.tsx:154–168  ·  view source on GitHub ↗
(tab: ClusterTab)

Source from the content-addressed store, hash-verified

152 }, [yieldsToField]);
153
154 const logTab = (tab: ClusterTab) => {
155 if (tab.root === ShellRoot.Activity) {
156 logEvent({
157 event_name: LogEvent.ClickNotificationIcon,
158 target_id: NotificationTarget.Footer,
159 extra: JSON.stringify({ notifications_number: unreadCount }),
160 });
161 } else {
162 logEvent({
163 event_name: LogEvent.Click,
164 target_id: TargetId.MobileFooterNav,
165 extra: JSON.stringify({ tab: tab.root, logged_in: !!user }),
166 });
167 }
168 };
169
170 // What a tab does when chosen; the link's own navigation covers the
171 // remaining case (a mouse click on another root).

Callers 1

activateFunction · 0.85

Calls 1

logEventFunction · 0.85

Tested by

no test coverage detected