Skip to content

Commit

Permalink
fix: example app TS issue and icons props issue
Browse files Browse the repository at this point in the history
  • Loading branch information
khushal87 committed Jun 6, 2024
1 parent 64b2f78 commit ba3829d
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 13 deletions.
18 changes: 11 additions & 7 deletions examples/ExpoMessaging/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ export type LocalEventType = Record<string, unknown>;
export type LocalMessageType = Record<string, unknown>;
export type LocalReactionType = Record<string, unknown>;
export type LocalUserType = Record<string, unknown>;
type LocalPollOptionType = Record<string, unknown>;
type LocalPollType = Record<string, unknown>;

export type StreamChatGenerics = {
attachmentType: LocalAttachmentType;
channelType: LocalChannelType;
commandType: LocalCommandType;
eventType: LocalEventType;
messageType: LocalMessageType;
reactionType: LocalReactionType;
userType: LocalUserType;
attachmentType: LocalAttachmentType;
channelType: LocalChannelType;
commandType: LocalCommandType;
eventType: LocalEventType;
messageType: LocalMessageType;
pollOptionType: LocalPollOptionType;
pollType: LocalPollType;
reactionType: LocalReactionType;
userType: LocalUserType;
};
Binary file removed examples/SampleApp/dist/SampleApp.app.dSYM.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions examples/SampleApp/src/components/ChannelInfoOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import Animated, {
import {
Avatar,
CircleClose,
Delete,
User,
UserMinus,
useTheme,
Expand All @@ -33,6 +32,7 @@ import {
import { useAppOverlayContext } from '../context/AppOverlayContext';
import { useBottomSheetOverlayContext } from '../context/BottomSheetOverlayContext';
import { useChannelInfoOverlayContext } from '../context/ChannelInfoOverlayContext';
import { Delete } from '../icons/Delete';

dayjs.extend(relativeTime);

Expand Down Expand Up @@ -408,7 +408,7 @@ export const ChannelInfoOverlay = (props: ChannelInfoOverlayProps) => {
]}
>
<View style={styles.rowInner}>
<Delete pathFill={accent_red} />
<Delete height={32} pathFill={accent_red} width={32} />
</View>
<Text style={[styles.rowText, { color: accent_red }]}>
Delete conversation
Expand Down
4 changes: 2 additions & 2 deletions examples/SampleApp/src/components/ChannelPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import Swipeable from 'react-native-gesture-handler/Swipeable';
import {
ChannelPreviewMessenger,
ChannelPreviewMessengerProps,
Delete,
MenuPointHorizontal,
useChatContext,
useTheme,
Expand All @@ -19,6 +18,7 @@ import { useChannelInfoOverlayContext } from '../context/ChannelInfoOverlayConte
import type { StackNavigationProp } from '@react-navigation/stack';

import type { StackNavigatorParamList, StreamChatGenerics } from '../types';
import { Delete } from '../icons/Delete';

const styles = StyleSheet.create({
leftSwipeableButton: {
Expand Down Expand Up @@ -99,7 +99,7 @@ export const ChannelPreview: React.FC<ChannelPreviewMessengerProps<StreamChatGen
}}
style={[styles.rightSwipeableButton]}
>
<Delete pathFill={accent_red} />
<Delete height={32} pathFill={accent_red} width={32} />
</RectButton>
</View>
)}
Expand Down
9 changes: 7 additions & 2 deletions examples/SampleApp/src/components/ConfirmationBottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { TouchableOpacity } from '@gorhom/bottom-sheet';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { Delete, UserMinus, useTheme } from 'stream-chat-react-native';
import { UserMinus, useTheme } from 'stream-chat-react-native';

import { useAppOverlayContext } from '../context/AppOverlayContext';
import {
isAddMemberBottomSheetData,
useBottomSheetOverlayContext,
} from '../context/BottomSheetOverlayContext';
import { Delete } from '../icons/Delete';

const styles = StyleSheet.create({
actionButtonLeft: {
Expand Down Expand Up @@ -75,7 +76,11 @@ export const ConfirmationBottomSheet: React.FC = () => {
]}
>
<View style={styles.description}>
{confirmText === 'LEAVE' ? <UserMinus pathFill={grey} /> : <Delete pathFill={accent_red} />}
{confirmText === 'LEAVE' ? (
<UserMinus pathFill={grey} />
) : (
<Delete height={32} pathFill={accent_red} width={32} />
)}
<Text style={[styles.title, { color: black }]}>{title}</Text>
<Text style={[styles.subtext, { color: black }]}>{subtext}</Text>
</View>
Expand Down
4 changes: 4 additions & 0 deletions examples/SampleApp/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ export type LocalReactionType = Record<string, unknown>;
export type LocalUserType = {
image?: string;
};
type LocalPollOptionType = Record<string, unknown>;
type LocalPollType = Record<string, unknown>;

export type StreamChatGenerics = {
attachmentType: LocalAttachmentType;
channelType: LocalChannelType;
commandType: LocalCommandType;
eventType: LocalEventType;
messageType: LocalMessageType;
pollOptionType: LocalPollOptionType;
pollType: LocalPollType;
reactionType: LocalReactionType;
userType: LocalUserType;
};
Expand Down
4 changes: 4 additions & 0 deletions examples/TypeScriptMessaging/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,17 @@ type LocalEventType = Record<string, unknown>;
type LocalMessageType = Record<string, unknown>;
type LocalReactionType = Record<string, unknown>;
type LocalUserType = Record<string, unknown>;
type LocalPollOptionType = Record<string, unknown>;
type LocalPollType = Record<string, unknown>;

type StreamChatGenerics = {
attachmentType: LocalAttachmentType;
channelType: LocalChannelType;
commandType: LocalCommandType;
eventType: LocalEventType;
messageType: LocalMessageType;
pollOptionType: LocalPollOptionType;
pollType: LocalPollType;
reactionType: LocalReactionType;
userType: LocalUserType;
};
Expand Down

0 comments on commit ba3829d

Please sign in to comment.