| 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). |