diff options
| author | Ivan Chen <ivan@tagg.id> | 2021-01-21 15:00:39 -0500 |
|---|---|---|
| committer | Ivan Chen <ivan@tagg.id> | 2021-01-21 15:00:39 -0500 |
| commit | 704c6c6bada682ec7e9008a775f4719fd1d0bd00 (patch) | |
| tree | 0cdd4fb0720abc2e54c2a0470b3a207090d6d859 /src/constants | |
| parent | 30a7a34f8c5eb379de4e5ebe38cfeeb259f3f1e3 (diff) | |
fixed isIPhoneX and adjusted spacing
Diffstat (limited to 'src/constants')
| -rw-r--r-- | src/constants/constants.ts | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/constants/constants.ts b/src/constants/constants.ts index b96d9438..0346c45f 100644 --- a/src/constants/constants.ts +++ b/src/constants/constants.ts @@ -1,13 +1,15 @@ import {ReactText} from 'react'; import {BackgroundGradientType, ExploreSectionType} from './../types/'; -import {SCREEN_WIDTH, SCREEN_HEIGHT} from '../utils'; +import {SCREEN_WIDTH, SCREEN_HEIGHT, isIPhoneX} from '../utils'; export const CHIN_HEIGHT = 34; -export const PROFILE_CUTOUT_TOP_Y = SCREEN_HEIGHT / 2.3; -export const PROFILE_CUTOUT_BOTTOM_Y = SCREEN_HEIGHT / 1.76; -export const PROFILE_CUTOUT_CORNER_X = SCREEN_WIDTH / 2.9; -export const PROFILE_CUTOUT_CORNER_Y = SCREEN_HEIGHT / 1.95; +export const PROFILE_CUTOUT_TOP_Y = SCREEN_HEIGHT * 0.435; +export const PROFILE_CUTOUT_BOTTOM_Y = isIPhoneX() + ? SCREEN_HEIGHT * 0.54 + : SCREEN_HEIGHT * 0.58; +export const PROFILE_CUTOUT_CORNER_X = SCREEN_WIDTH * 0.344; +export const PROFILE_CUTOUT_CORNER_Y = SCREEN_HEIGHT * 0.513; export const IMAGE_WIDTH = SCREEN_WIDTH; export const IMAGE_HEIGHT = SCREEN_WIDTH; |
