mirror of
https://github.com/makeplane/plane.git
synced 2025-12-25 08:09:33 +01:00
* chore: add n-progress lib. * chore: prevent unwanted n-progress from projects and notifications. * fix: lint errors.
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>
|
|
);
|
|
};
|
|
}
|