@@ -3,8 +3,7 @@ import { StyleSheet, Text, View } from 'react-native';
33
44import { useTheme } from '../../contexts/themeContext/ThemeContext' ;
55import { useTranslationContext } from '../../contexts/translationContext/TranslationContext' ;
6- import { useViewport } from '../../hooks/useViewport' ;
7- import { ChatIcon , MessageBubbleEmpty , MessageIcon } from '../../icons' ;
6+ import { MessageBubbleEmpty } from '../../icons' ;
87import { primitives } from '../../theme' ;
98
109export type EmptyStateProps = {
@@ -14,59 +13,41 @@ export type EmptyStateProps = {
1413export const EmptyStateIndicator = ( { listType } : EmptyStateProps ) => {
1514 const {
1615 theme : {
17- colors : { black, grey, grey_gainsboro } ,
18- emptyStateIndicator : {
19- channelContainer,
20- channelDetails,
21- channelTitle,
22- messageContainer,
23- messageTitle,
24- } ,
16+ emptyStateIndicator : { channelContainer, channelTitle, messageContainer, messageTitle } ,
2517 semantics,
2618 } ,
2719 } = useTheme ( ) ;
28- const { vw } = useViewport ( ) ;
29- const width = vw ( 33 ) ;
3020 const { t } = useTranslationContext ( ) ;
3121 const styles = useStyles ( ) ;
3222
3323 switch ( listType ) {
3424 case 'channel' :
3525 return (
3626 < View style = { [ styles . container , channelContainer ] } >
37- < MessageIcon height = { width } pathFill = { grey_gainsboro } width = { width } />
38- < Text
39- style = { [ styles . channelTitle , { color : black } , channelTitle ] }
40- testID = 'empty-channel-state-title'
41- >
42- { t ( "Let's start chatting!" ) }
43- </ Text >
44- < Text
45- style = { [ styles . channelDetails , { color : grey , width : vw ( 66 ) } , channelDetails ] }
46- testID = 'empty-channel-state-details'
47- >
48- { t ( 'How about sending your first message to a friend?' ) }
27+ < MessageBubbleEmpty height = { 27 } stroke = { semantics . textTertiary } width = { 25 } />
28+ < Text style = { [ styles . channelTitle , channelTitle ] } testID = 'empty-channel-state-title' >
29+ { t ( 'No conversations yet' ) }
4930 </ Text >
5031 </ View >
5132 ) ;
5233 case 'message' :
5334 return (
5435 < View style = { [ styles . container , messageContainer ] } >
55- < ChatIcon height = { width } pathFill = { grey_gainsboro } width = { width } />
56- < Text style = { [ styles . messageTitle , { color : grey_gainsboro } , messageTitle ] } >
57- { t ( 'No chats here yet…' ) }
58- </ Text >
36+ < MessageBubbleEmpty height = { 27 } stroke = { semantics . textTertiary } width = { 25 } />
37+ < Text style = { [ styles . messageTitle , messageTitle ] } > { t ( 'No chats here yet…' ) } </ Text >
5938 </ View >
6039 ) ;
6140 case 'threads' :
6241 return (
63- < View style = { [ styles . container ] } >
42+ < View style = { styles . container } >
6443 < MessageBubbleEmpty height = { 27 } stroke = { semantics . textTertiary } width = { 25 } />
6544 < Text style = { styles . threadText } > { t ( 'Reply to a message to start a thread' ) } </ Text >
6645 </ View >
6746 ) ;
6847 default :
69- return < Text style = { [ { color : black } , messageContainer ] } > No items exist</ Text > ;
48+ return (
49+ < Text style = { [ { color : semantics . textSecondary } , messageContainer ] } > No items exist</ Text >
50+ ) ;
7051 }
7152} ;
7253
@@ -82,9 +63,12 @@ const useStyles = () => {
8263 textAlign : 'center' ,
8364 } ,
8465 channelTitle : {
85- fontSize : 16 ,
86- paddingBottom : 8 ,
87- paddingTop : 16 ,
66+ color : semantics . textSecondary ,
67+ fontSize : primitives . typographyFontSizeMd ,
68+ fontWeight : primitives . typographyFontWeightRegular ,
69+ lineHeight : primitives . typographyLineHeightNormal ,
70+ textAlign : 'center' ,
71+ paddingVertical : primitives . spacingSm ,
8872 } ,
8973 container : {
9074 alignItems : 'center' ,
@@ -97,7 +81,7 @@ const useStyles = () => {
9781 paddingBottom : 8 ,
9882 } ,
9983 threadText : {
100- color : semantics . textTertiary ,
84+ color : semantics . textSecondary ,
10185 fontSize : primitives . typographyFontSizeMd ,
10286 fontWeight : primitives . typographyFontWeightRegular ,
10387 lineHeight : primitives . typographyLineHeightNormal ,
0 commit comments