Files
plane/web/core/lib/n-progress/withSuspense.tsx
Prateek Shourya 626464513d chore: add custom n-progress component to fix unwanted n-progress trigger issues. (#4965)
* chore: add n-progress lib.

* chore: prevent unwanted n-progress from projects and notifications.

* fix: lint errors.
2024-06-28 20:39:19 +05:30

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>
);
};
}