Skip to content

Commit

Permalink
fix: bring back staging indicator on bottom tabs (#11179)
Browse files Browse the repository at this point in the history
  • Loading branch information
MounirDhahri authored Nov 22, 2024
1 parent 8bc09f6 commit 36a05a9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/app/Navigation/AuthenticatedRoutes/Tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { tappedTabBar } from "@artsy/cohesion"
import { Text } from "@artsy/palette-mobile"
import { Text, useColor } from "@artsy/palette-mobile"
import { THEME } from "@artsy/palette-tokens"
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"
import { createNativeStackNavigator } from "@react-navigation/native-stack"
Expand All @@ -17,6 +17,7 @@ import { bottomTabsConfig } from "app/Scenes/BottomTabs/bottomTabsConfig"
import { OnboardingQuiz } from "app/Scenes/Onboarding/OnboardingQuiz/OnboardingQuiz"
import { GlobalStore } from "app/store/GlobalStore"
import { internal_navigationRef } from "app/system/navigation/navigate"
import { useIsStaging } from "app/utils/hooks/useIsStaging"
import { postEventToProviders } from "app/utils/track/providers"
import { Platform } from "react-native"
import { useSafeAreaInsets } from "react-native-safe-area-context"
Expand Down Expand Up @@ -47,8 +48,15 @@ const BOTTOM_TABS_HEIGHT = 60

const AppTabs: React.FC = () => {
const { tabsBadges } = useBottomTabsBadges()
const color = useColor()
const isStaging = useIsStaging()
const insets = useSafeAreaInsets()

const stagingTabBarStyle = {
borderTopColor: color("devpurple"),
borderTopWidth: 1,
}

return (
<Tab.Navigator
screenOptions={({ route }) => {
Expand All @@ -63,6 +71,8 @@ const AppTabs: React.FC = () => {
currentRoute && modules[currentRoute as AppModule]?.options.hidesBottomTabs
? "none"
: "flex",

...(isStaging ? stagingTabBarStyle : {}),
},
tabBarHideOnKeyboard: true,
tabBarIcon: ({ focused }) => {
Expand Down

0 comments on commit 36a05a9

Please sign in to comment.