Skip to content

Commit

Permalink
Show message in header if testnet.
Browse files Browse the repository at this point in the history
  • Loading branch information
jessgusclark committed Sep 29, 2023
1 parent 1c56a15 commit 561b15e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/ux/appHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ import OIcon from 'react-native-vector-icons/Octicons'
import { useSafeAreaInsets } from 'react-native-safe-area-context'

import { rootTabsRouteNames } from 'navigation/rootNavigator'
import { selectTopColor, selectWallet } from 'store/slices/settingsSlice'
import {
selectChainId,
selectTopColor,
selectWallet,
} from 'store/slices/settingsSlice'
import { useAppSelector } from 'store/storeUtils'
import { sharedColors } from 'shared/constants'
import { AppTouchable } from 'components/appTouchable'
import { castStyle } from 'shared/utils'
import { Typography } from 'src/components'

import { ProfileHandler } from './ProfileHandler'

Expand All @@ -20,6 +25,7 @@ export const AppHeader = ({ navigation, route }: HeaderProps) => {
const insets = useSafeAreaInsets()
const topColor = useAppSelector(selectTopColor)
const wallet = useAppSelector(selectWallet)
const chainId = useAppSelector(selectChainId)

const openMenu = useCallback(() => {
if (route?.name === rootTabsRouteNames.Settings) {
Expand All @@ -41,6 +47,11 @@ export const AppHeader = ({ navigation, route }: HeaderProps) => {
<View style={[styles.column, styles.walletInfo]}>
{wallet && <ProfileHandler wallet={wallet} navigation={navigation} />}
</View>
{chainId === 31 && (
<View>
<Typography type="h4">TESTNET</Typography>
</View>
)}
<View style={styles.columnMenu}>
<AppTouchable
width={16}
Expand Down

0 comments on commit 561b15e

Please sign in to comment.