Skip to content

Commit

Permalink
fix(mobile): fix initial tabbar active position (#347)
Browse files Browse the repository at this point in the history
Resolves #323
  • Loading branch information
bkdev98 committed Sep 21, 2024
1 parent a233ddb commit 407dda7
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 407dda7

Please sign in to comment.