Skip to content

Commit

Permalink
fix: lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
khushal87 committed Dec 4, 2024
1 parent 7a9acb5 commit c032297
Show file tree
Hide file tree
Showing 7 changed files with 699 additions and 710 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ export const useCreateMessagesContext = <
targetedMessage,
TypingIndicator,
TypingIndicatorContainer,
updateMessage,
UnreadMessagesNotification,
updateMessage,
UrlPreview,
VideoThumbnail,
}: MessagesContextValue<StreamChatGenerics> & {
Expand Down Expand Up @@ -212,8 +212,8 @@ export const useCreateMessagesContext = <
targetedMessage,
TypingIndicator,
TypingIndicatorContainer,
updateMessage,
UnreadMessagesNotification,
updateMessage,
UrlPreview,
VideoThumbnail,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export const useMessageListPagination = <
* Loads channel at first unread message.
*/
const loadChannelAtFirstUnreadMessage: ChannelContextValue<StreamChatGenerics>['loadChannelAtFirstUnreadMessage'] =
async ({ limit = 25, channelUnreadState, setChannelUnreadState, setTargetedMessage }) => {
async ({ channelUnreadState, limit = 25, setChannelUnreadState, setTargetedMessage }) => {
try {
if (!channelUnreadState?.unread_messages) return;
const { first_unread_message_id, last_read, last_read_message_id } = channelUnreadState;
Expand Down
24 changes: 12 additions & 12 deletions package/src/components/MessageList/InlineUnreadIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,6 @@ import { StyleSheet, Text, View } from 'react-native';
import { useTheme } from '../../contexts/themeContext/ThemeContext';
import { useTranslationContext } from '../../contexts/translationContext/TranslationContext';

const styles = StyleSheet.create({
container: {
alignItems: 'center',
justifyContent: 'center',
padding: 10,
marginTop: 2,
},
text: {
fontSize: 12,
},
});

export const InlineUnreadIndicator = () => {
const {
theme: {
Expand All @@ -33,3 +21,15 @@ export const InlineUnreadIndicator = () => {
</View>
);
};

const styles = StyleSheet.create({
container: {
alignItems: 'center',
justifyContent: 'center',
marginTop: 2,
padding: 10,
},
text: {
fontSize: 12,
},
});
20 changes: 10 additions & 10 deletions package/src/components/MessageList/UnreadMessagesNotification.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React from 'react';
import { Pressable, StyleSheet, Text } from 'react-native';

import { useTheme } from '../../contexts/themeContext/ThemeContext';
import { Close } from '../../icons';
import { useTranslationContext } from '../../contexts/translationContext/TranslationContext';
import { Close } from '../../icons';

export type UnreadMessagesNotificationProps = {
/**
Expand All @@ -12,7 +14,6 @@ export type UnreadMessagesNotificationProps = {
* Callback to handle the close event
*/
onCloseHandler?: () => void;

/**
* If the notification is visible
*/
Expand Down Expand Up @@ -58,24 +59,23 @@ export const UnreadMessagesNotification = (props: UnreadMessagesNotificationProp
const styles = StyleSheet.create({
container: {
alignItems: 'center',
flexDirection: 'row',
position: 'absolute',
top: 8,
borderRadius: 20,
paddingVertical: 8,
elevation: 4,
flexDirection: 'row',
paddingHorizontal: 16,
paddingVertical: 8,
position: 'absolute',
shadowColor: '#000',
shadowOffset: {
width: 0,
height: 2,
width: 0,
},
shadowOpacity: 0.23,
shadowRadius: 2.62,

elevation: 4,
top: 8,
},
text: {
marginRight: 8,
fontWeight: '500',
marginRight: 8,
},
});
Loading

0 comments on commit c032297

Please sign in to comment.