Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: typing issues in sample app #1942

Merged
merged 1 commit into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/SampleApp/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ const DrawerNavigatorWrapper: React.FC<{
<Chat<StreamChatGenerics>
client={chatClient}
enableOfflineSupport
// @ts-expect-error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A thing to fix in the future so it will satisfy

ImageComponent={FastImage}
>
<AppOverlayProvider>
Expand Down
8 changes: 5 additions & 3 deletions examples/SampleApp/src/context/AppOverlayProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ import { BottomSheetOverlayProvider } from './BottomSheetOverlayContext';
import { ChannelInfoOverlayProvider } from './ChannelInfoOverlayContext';
import { UserInfoOverlayProvider } from './UserInfoOverlayContext';

export const AppOverlayProvider: React.FC<{
value?: Partial<AppOverlayContextValue>;
}> = (props) => {
export const AppOverlayProvider = (
props: React.PropsWithChildren<{
value?: Partial<AppOverlayContextValue>;
}>,
) => {
const { children, value } = props;

const [overlay, setOverlay] = useState(value?.overlay || 'none');
Expand Down
7 changes: 4 additions & 3 deletions examples/SampleApp/src/context/UserSearchContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ export type UserSearchContextValue = PaginatedUsers;

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

export const UserSearchProvider: React.FC<{
value?: UserSearchContextValue;
}> = ({ children, value }) => {
export const UserSearchProvider = (
props: React.PropsWithChildren<{ value?: UserSearchContextValue }>,
) => {
const { children, value } = props;
const paginatedUsers = usePaginatedUsers();

const userSearchContext = { ...paginatedUsers, ...value };
Expand Down