diff options
author | Ansh <anshnanda10@gmail.com> | 2023-06-15 14:45:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-15 16:45:14 -0500 |
commit | 17e7590bcd36f9ec3433cb2714a9319fac4aeebf (patch) | |
tree | 71edb7056abedd460d275944711e4fc001a2ffe6 /src/view/shell/bottom-bar/BottomBar.tsx | |
parent | 1695ae34dbd08432f21f524ed32ad7012bfb201e (diff) | |
download | voidsky-17e7590bcd36f9ec3433cb2714a9319fac4aeebf.tar.zst |
[APP-511] metrics overhaul: frontend work (#506)
* WIP * fix types and update imports * wip * tagged events that should be server side * remove server-side analytics * remove useless import * add additional profile header events * remove useless import * track follow/unfollow clicks * add missing types
Diffstat (limited to 'src/view/shell/bottom-bar/BottomBar.tsx')
-rw-r--r-- | src/view/shell/bottom-bar/BottomBar.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/view/shell/bottom-bar/BottomBar.tsx b/src/view/shell/bottom-bar/BottomBar.tsx index e8cba9047..09b6f9f65 100644 --- a/src/view/shell/bottom-bar/BottomBar.tsx +++ b/src/view/shell/bottom-bar/BottomBar.tsx @@ -11,7 +11,7 @@ import {useSafeAreaInsets} from 'react-native-safe-area-context' import {observer} from 'mobx-react-lite' import {Text} from 'view/com/util/text/Text' import {useStores} from 'state/index' -import {useAnalytics} from 'lib/analytics' +import {useAnalytics} from 'lib/analytics/analytics' import {clamp} from 'lib/numbers' import { HomeIcon, @@ -30,6 +30,8 @@ import {useMinimalShellMode} from 'lib/hooks/useMinimalShellMode' import {useNavigationTabState} from 'lib/hooks/useNavigationTabState' import {UserAvatar} from 'view/com/util/UserAvatar' +type TabOptions = 'Home' | 'Search' | 'Notifications' | 'MyProfile' | 'Feeds' + export const BottomBar = observer(({navigation}: BottomTabBarProps) => { const store = useStores() const pal = usePalette('default') @@ -42,7 +44,7 @@ export const BottomBar = observer(({navigation}: BottomTabBarProps) => { const {notifications} = store.me const onPressTab = React.useCallback( - (tab: string) => { + (tab: TabOptions) => { track(`MobileShell:${tab}ButtonPressed`) const state = navigation.getState() const tabState = getTabState(state, tab) |