aboutsummaryrefslogtreecommitdiff
path: root/src/utils/misc.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/misc.tsx')
-rw-r--r--src/utils/misc.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/misc.tsx b/src/utils/misc.tsx
index e52a57f..55e0c22 100644
--- a/src/utils/misc.tsx
+++ b/src/utils/misc.tsx
@@ -74,9 +74,9 @@ export function useAwaiter<T>(factory: () => Promise<T>, fallbackValue: T | null
* @param factory Function returning a Component
* @returns Result of factory function
*/
-export function LazyComponent<T extends JSX.IntrinsicAttributes = any>(factory: () => React.ComponentType<T>) {
+export function LazyComponent<T = any>(factory: () => React.ComponentType<T>) {
const get = makeLazy(factory);
- return (props: T) => {
+ return (props: T & JSX.IntrinsicAttributes) => {
const Component = get();
return <Component {...props} />;
};