From 0f332655d2b64700623f25912d2610517fb954b6 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Wed, 7 Oct 2020 20:17:13 -0400 Subject: [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 --- src/utils/statusBarHeight.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/utils') 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); +}; -- cgit v1.2.3-70-g09d2