diff options
author | Ivan Chen <ivan@thetaggid.com> | 2020-10-07 20:17:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-07 20:17:13 -0400 |
commit | 0f332655d2b64700623f25912d2610517fb954b6 (patch) | |
tree | bf0f4b6fb1f5f226dea4a6ee9d312d28a258bda4 /src/utils | |
parent | e86478f52e191c52fea20980278174af46f50953 (diff) |
[TMA-186] Instagram Taggs - Frontend (#45)
* Renamed Moments(Bar) to Taggs(Bar)
* created initial navigation and empty social media taggs screen
* made more progress for the header styling
* Finished social media taggs screen, organized code structure
* linted stuff D:
* moved bar height utility function to utils
* moved color constants to constants
* moved avatar title
* updated comments for social media taggs
* NOW the file is there
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/statusBarHeight.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/statusBarHeight.ts b/src/utils/statusBarHeight.ts index 4c68f9ee..dd4a67ac 100644 --- a/src/utils/statusBarHeight.ts +++ b/src/utils/statusBarHeight.ts @@ -1,4 +1,6 @@ +import {useHeaderHeight} from '@react-navigation/stack'; import {Platform, StatusBar} from 'react-native'; +import {AVATAR_DIM} from '../constants'; import {SCREEN_WIDTH, SCREEN_HEIGHT} from './screenDimensions'; const X_WIDTH = 375; @@ -17,3 +19,7 @@ export const StatusBarHeight = Platform.select({ android: StatusBar.currentHeight, default: 0, }); + +export const headerBarHeightWithImage = () => { + return Math.max(useHeaderHeight() + 14, AVATAR_DIM + StatusBarHeight + 14); +}; |