From 8be3d6fda4233aa8ab9eb4bec90dca586db81229 Mon Sep 17 00:00:00 2001 From: daledah Date: Tue, 27 Aug 2024 16:04:54 +0700 Subject: [PATCH 01/24] feat: update trips empty state view --- src/components/EmptyStateComponent/index.tsx | 6 +- src/components/EmptyStateComponent/types.ts | 4 +- src/languages/en.ts | 2 +- src/languages/es.ts | 2 +- src/pages/Search/EmptySearchView.tsx | 71 ++++++++++++++++++-- 5 files changed, 76 insertions(+), 9 deletions(-) diff --git a/src/components/EmptyStateComponent/index.tsx b/src/components/EmptyStateComponent/index.tsx index 6fcee2290d2b..f2be42c3a583 100644 --- a/src/components/EmptyStateComponent/index.tsx +++ b/src/components/EmptyStateComponent/index.tsx @@ -1,4 +1,5 @@ import type {VideoReadyForDisplayEvent} from 'expo-av'; +import {isString} from 'lodash'; import React, {useMemo, useState} from 'react'; import {View} from 'react-native'; import Button from '@components/Button'; @@ -20,6 +21,7 @@ function EmptyStateComponent({ buttonText, buttonAction, title, + titleStyles, subtitle, headerStyles, headerContentStyles, @@ -88,8 +90,8 @@ function EmptyStateComponent({ {HeaderComponent} - {title} - {subtitle} + {title} + {isString(subtitle) ? {subtitle} : subtitle} {!!buttonText && !!buttonAction && (