import { ErrorBoundary } from "components/pages/ErrorBoundary"; import ComponentError from "components/system/Apps/ComponentError"; import dynamic from "next/dynamic"; import { memo } from "react"; const Window = dynamic(() => import("components/system/Window")); export type ComponentProcessProps = { id: string; }; type RenderComponentProps = { Component: React.ComponentType; hasWindow?: boolean; id: string; }; const RenderComponent: FC = ({ Component, hasWindow = true, id, }) => { const SafeComponent = ( }> ); return hasWindow ? {SafeComponent} : SafeComponent; }; export default memo(RenderComponent);