-
Notifications
You must be signed in to change notification settings - Fork 42
[MOB-10033] Example App: inbox #591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bb11b56
b0c5b92
fd85e40
5478edc
cdd6e2a
5a35f6b
2a639ad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| import { Route } from '../../constants'; | ||
|
|
||
| export const routeIcon = { | ||
| [Route.Inbox]: 'mail-outline', | ||
| [Route.User]: 'person-outline', | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| export const iterableInboxCustomization = { | ||
| navTitle: 'Iterable', | ||
| noMessagesTitle: 'No messages today', | ||
| noMessagesBody: 'Come back later', | ||
|
|
||
| unreadIndicatorContainer: { | ||
| flexDirection: 'column', | ||
| justifyContent: 'flex-start', | ||
| }, | ||
|
|
||
| unreadIndicator: { | ||
| width: 15, | ||
| height: 15, | ||
| borderRadius: 15 / 2, | ||
| backgroundColor: 'orange', | ||
| marginLeft: 10, | ||
| marginRight: 10, | ||
| marginTop: 10, | ||
| }, | ||
|
|
||
| unreadMessageIconContainer: { | ||
| paddingLeft: 0, | ||
| flexDirection: 'column', | ||
| justifyContent: 'center', | ||
| }, | ||
|
|
||
| readMessageIconContainer: { | ||
| paddingLeft: 35, | ||
| flexDirection: 'column', | ||
| justifyContent: 'center', | ||
| }, | ||
|
|
||
| messageContainer: { | ||
| paddingLeft: 10, | ||
| width: '65%', | ||
| flexDirection: 'column', | ||
| justifyContent: 'center', | ||
| }, | ||
|
|
||
| title: { | ||
| fontSize: 22, | ||
| paddingBottom: 10, | ||
| }, | ||
|
|
||
| body: { | ||
| fontSize: 15, | ||
| color: 'lightgray', | ||
| width: '65%', | ||
| flexWrap: 'wrap', | ||
| paddingBottom: 10, | ||
| }, | ||
|
|
||
| createdAt: { | ||
| fontSize: 12, | ||
| color: 'lightgray', | ||
| }, | ||
|
|
||
| messageRow: { | ||
| flexDirection: 'row', | ||
| backgroundColor: 'white', | ||
| paddingTop: 10, | ||
| paddingBottom: 10, | ||
| height: 200, | ||
| borderStyle: 'solid', | ||
| borderColor: 'red', | ||
| borderTopWidth: 1, | ||
| }, | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import { | ||
| IterableInbox, | ||
| type IterableInboxProps, | ||
| } from '@iterable/react-native-sdk'; | ||
|
|
||
| import { useIterableApp } from '../../hooks'; | ||
| import { iterableInboxCustomization } from './Inbox.constants'; | ||
|
|
||
| export const Inbox = (props: IterableInboxProps) => { | ||
| const { returnToInboxTrigger } = useIterableApp(); | ||
|
|
||
| return ( | ||
| <IterableInbox | ||
| returnToInboxTrigger={returnToInboxTrigger} | ||
| customizations={iterableInboxCustomization} | ||
| {...props} | ||
| /> | ||
| ); | ||
| }; | ||
|
|
||
| export default Inbox; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| export * from './Inbox'; | ||
| export { default } from './Inbox'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| export enum Route { | ||
| Inbox = 'Inbox', | ||
| Login = 'Login', | ||
| Main = 'Main', | ||
| User = 'User', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,9 +52,7 @@ export const IterableInboxMessageList = ({ | |
| swipingCheck={setSwiping} | ||
| messageListItemLayout={messageListItemLayout} | ||
| deleteRow={(messageId: string) => deleteRow(messageId)} | ||
| handleMessageSelect={(messageId: string, i: number) => | ||
| handleMessageSelect(messageId, i) | ||
| } | ||
| handleMessageSelect={handleMessageSelect} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Whats the reason for this change?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cleanliness/readability.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Gotcha. Can the same be done for deleteRow? |
||
| contentWidth={contentWidth} | ||
| isPortrait={isPortrait} | ||
| /> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.