diff options
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) |