Skip to content

Commit e2d34be

Browse files
authored
fix: typing issues in sample app (#1942)
1 parent c5bee16 commit e2d34be

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

examples/SampleApp/App.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ const DrawerNavigatorWrapper: React.FC<{
185185
<Chat<StreamChatGenerics>
186186
client={chatClient}
187187
enableOfflineSupport
188+
// @ts-expect-error
188189
ImageComponent={FastImage}
189190
>
190191
<AppOverlayProvider>

examples/SampleApp/src/context/AppOverlayProvider.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ import { BottomSheetOverlayProvider } from './BottomSheetOverlayContext';
1818
import { ChannelInfoOverlayProvider } from './ChannelInfoOverlayContext';
1919
import { UserInfoOverlayProvider } from './UserInfoOverlayContext';
2020

21-
export const AppOverlayProvider: React.FC<{
22-
value?: Partial<AppOverlayContextValue>;
23-
}> = (props) => {
21+
export const AppOverlayProvider = (
22+
props: React.PropsWithChildren<{
23+
value?: Partial<AppOverlayContextValue>;
24+
}>,
25+
) => {
2426
const { children, value } = props;
2527

2628
const [overlay, setOverlay] = useState(value?.overlay || 'none');

examples/SampleApp/src/context/UserSearchContext.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ export type UserSearchContextValue = PaginatedUsers;
66

77
export const UserSearchContext = React.createContext({} as UserSearchContextValue);
88

9-
export const UserSearchProvider: React.FC<{
10-
value?: UserSearchContextValue;
11-
}> = ({ children, value }) => {
9+
export const UserSearchProvider = (
10+
props: React.PropsWithChildren<{ value?: UserSearchContextValue }>,
11+
) => {
12+
const { children, value } = props;
1213
const paginatedUsers = usePaginatedUsers();
1314

1415
const userSearchContext = { ...paginatedUsers, ...value };

0 commit comments

Comments
 (0)