Skip to content

Commit

Permalink
fix: use ComponentType instead of function structure in CommonCompone…
Browse files Browse the repository at this point in the history
…nt type
  • Loading branch information
bang9 committed Feb 1, 2024
1 parent efe57e3 commit 2cf00e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/uikit-react-native/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ErrorInfo, ReactNode } from 'react';
import type { ComponentType, ErrorInfo, ReactNode } from 'react';

import type { SendbirdUser } from '@sendbird/uikit-utils';

Expand All @@ -17,7 +17,7 @@ export interface LocalCacheStorage {

export type ErrorBoundaryProps = { error: Error; errorInfo: ErrorInfo; reset: () => void };

export type CommonComponent<P = {}> = (props: P & { children?: ReactNode }) => null | ReactNode;
export type CommonComponent<P = {}> = ComponentType<P & { children?: ReactNode | undefined }>;

export type MentionedUser = {
range: Range;
Expand Down

0 comments on commit 2cf00e9

Please sign in to comment.