Skip to content

Commit c032297

Browse files
committed
fix: lint issues
1 parent 7a9acb5 commit c032297

File tree

7 files changed

+699
-710
lines changed

7 files changed

+699
-710
lines changed

package/src/components/Channel/hooks/useCreateMessagesContext.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ export const useCreateMessagesContext = <
101101
targetedMessage,
102102
TypingIndicator,
103103
TypingIndicatorContainer,
104-
updateMessage,
105104
UnreadMessagesNotification,
105+
updateMessage,
106106
UrlPreview,
107107
VideoThumbnail,
108108
}: MessagesContextValue<StreamChatGenerics> & {
@@ -212,8 +212,8 @@ export const useCreateMessagesContext = <
212212
targetedMessage,
213213
TypingIndicator,
214214
TypingIndicatorContainer,
215-
updateMessage,
216215
UnreadMessagesNotification,
216+
updateMessage,
217217
UrlPreview,
218218
VideoThumbnail,
219219
}),

package/src/components/Channel/hooks/useMessageListPagination.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export const useMessageListPagination = <
190190
* Loads channel at first unread message.
191191
*/
192192
const loadChannelAtFirstUnreadMessage: ChannelContextValue<StreamChatGenerics>['loadChannelAtFirstUnreadMessage'] =
193-
async ({ limit = 25, channelUnreadState, setChannelUnreadState, setTargetedMessage }) => {
193+
async ({ channelUnreadState, limit = 25, setChannelUnreadState, setTargetedMessage }) => {
194194
try {
195195
if (!channelUnreadState?.unread_messages) return;
196196
const { first_unread_message_id, last_read, last_read_message_id } = channelUnreadState;

package/src/components/MessageList/InlineUnreadIndicator.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,6 @@ import { StyleSheet, Text, View } from 'react-native';
44
import { useTheme } from '../../contexts/themeContext/ThemeContext';
55
import { useTranslationContext } from '../../contexts/translationContext/TranslationContext';
66

7-
const styles = StyleSheet.create({
8-
container: {
9-
alignItems: 'center',
10-
justifyContent: 'center',
11-
padding: 10,
12-
marginTop: 2,
13-
},
14-
text: {
15-
fontSize: 12,
16-
},
17-
});
18-
197
export const InlineUnreadIndicator = () => {
208
const {
219
theme: {
@@ -33,3 +21,15 @@ export const InlineUnreadIndicator = () => {
3321
</View>
3422
);
3523
};
24+
25+
const styles = StyleSheet.create({
26+
container: {
27+
alignItems: 'center',
28+
justifyContent: 'center',
29+
marginTop: 2,
30+
padding: 10,
31+
},
32+
text: {
33+
fontSize: 12,
34+
},
35+
});

package/src/components/MessageList/UnreadMessagesNotification.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import React from 'react';
12
import { Pressable, StyleSheet, Text } from 'react-native';
3+
24
import { useTheme } from '../../contexts/themeContext/ThemeContext';
3-
import { Close } from '../../icons';
45
import { useTranslationContext } from '../../contexts/translationContext/TranslationContext';
6+
import { Close } from '../../icons';
57

68
export type UnreadMessagesNotificationProps = {
79
/**
@@ -12,7 +14,6 @@ export type UnreadMessagesNotificationProps = {
1214
* Callback to handle the close event
1315
*/
1416
onCloseHandler?: () => void;
15-
1617
/**
1718
* If the notification is visible
1819
*/
@@ -58,24 +59,23 @@ export const UnreadMessagesNotification = (props: UnreadMessagesNotificationProp
5859
const styles = StyleSheet.create({
5960
container: {
6061
alignItems: 'center',
61-
flexDirection: 'row',
62-
position: 'absolute',
63-
top: 8,
6462
borderRadius: 20,
65-
paddingVertical: 8,
63+
elevation: 4,
64+
flexDirection: 'row',
6665
paddingHorizontal: 16,
66+
paddingVertical: 8,
67+
position: 'absolute',
6768
shadowColor: '#000',
6869
shadowOffset: {
69-
width: 0,
7070
height: 2,
71+
width: 0,
7172
},
7273
shadowOpacity: 0.23,
7374
shadowRadius: 2.62,
74-
75-
elevation: 4,
75+
top: 8,
7676
},
7777
text: {
78-
marginRight: 8,
7978
fontWeight: '500',
79+
marginRight: 8,
8080
},
8181
});

0 commit comments

Comments
 (0)