-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: reorganized and created useThreadMessages hook
- Loading branch information
1 parent
6ff6647
commit 6ef34b5
Showing
8 changed files
with
466 additions
and
461 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from 'react'; | ||
import I18n from 'i18n-js'; | ||
|
||
import { Filter } from '../filters'; | ||
import BackgroundContainer from '../../../containers/BackgroundContainer'; | ||
|
||
type TEmptyThreads = { | ||
currentFilter: Filter; | ||
}; | ||
|
||
const EmptyThreads = ({ currentFilter }: TEmptyThreads) => { | ||
let text; | ||
if (currentFilter === Filter.Following) { | ||
text = I18n.t('No_threads_following'); | ||
} else if (currentFilter === Filter.Unread) { | ||
text = I18n.t('No_threads_unread'); | ||
} else { | ||
text = I18n.t('No_threads'); | ||
} | ||
return <BackgroundContainer text={text} />; | ||
}; | ||
|
||
export default EmptyThreads; |
8 changes: 4 additions & 4 deletions
8
...views/ThreadMessagesView/Item.stories.tsx → ...agesView/components/Item/Item.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { StyleSheet } from "react-native"; | ||
|
||
import sharedStyles from '../../../Styles'; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flexDirection: 'row', | ||
padding: 16 | ||
}, | ||
contentContainer: { | ||
flexDirection: 'column', | ||
flex: 1 | ||
}, | ||
titleContainer: { | ||
flexDirection: 'row', | ||
marginBottom: 2, | ||
alignItems: 'center' | ||
}, | ||
title: { | ||
flexShrink: 1, | ||
fontSize: 18, | ||
...sharedStyles.textMedium | ||
}, | ||
time: { | ||
fontSize: 14, | ||
marginLeft: 4, | ||
...sharedStyles.textRegular | ||
}, | ||
avatar: { | ||
marginRight: 8 | ||
}, | ||
threadDetails: { | ||
marginTop: 8 | ||
}, | ||
badge: { | ||
width: 8, | ||
height: 8, | ||
borderRadius: 4, | ||
marginHorizontal: 8, | ||
alignSelf: 'center' | ||
}, | ||
messageContainer: { | ||
flexDirection: 'row' | ||
}, | ||
markdown: { | ||
flex: 1 | ||
} | ||
}); | ||
|
||
export default styles |
Oops, something went wrong.