mirror of
https://github.com/makeplane/plane
synced 2025-08-07 19:59:33 +00:00
12 lines
290 B
TypeScript
12 lines
290 B
TypeScript
import React, { ComponentType, Suspense } from "react";
|
|
|
|
export default function withSuspense<P extends object>(Component: ComponentType<P>) {
|
|
return function WithSuspenseComponent(props: P) {
|
|
return (
|
|
<Suspense>
|
|
<Component {...props} />
|
|
</Suspense>
|
|
);
|
|
};
|
|
}
|