Skip to content

Commit

Permalink
fix(mobile): fix initial tabbar active position
Browse files Browse the repository at this point in the history
  • Loading branch information
bkdev98 committed Sep 21, 2024
1 parent ccaa744 commit dc1d49e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/mobile/components/common/tab-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const TAB_BAR_ICONS = {
const TAB_BAR_ITEM_WIDTH = (3 + 1) * rem.get()

export function TabBar({ state, descriptors, navigation }: BottomTabBarProps) {
const tabIndicatorPosition = useSharedValue(0)
const tabIndicatorPosition = useSharedValue(state.index * TAB_BAR_ITEM_WIDTH)

const animatedStyle = useAnimatedStyle(() => ({
transform: [{ translateX: tabIndicatorPosition.value }],
Expand Down

0 comments on commit dc1d49e

Please sign in to comment.