import WindowContainer from "@/components/WindowContainer"; import { lazy, memo, useMemo, type FC } from "react"; import React from "react"; import { WindowProvider } from "@/contexts/windows/window"; // import { ErrorBoundary } from "components/pages/ErrorBoundary"; // import ComponentError from "components/system/Apps/ComponentError"; // eslint-disable-next-line react-refresh/only-export-components const Window = lazy(() => import("../Window")); export type ComponentWindowProps = { id: string; }; type RenderComponentProps = { Component: React.ComponentType; id: string; }; const WindowWrapperFC: FC = ({ Component, id, // addContainer = false, }) => { const props = useMemo(() => ({ rd_window_id: id, id }), [id]); const SafeComponent = useMemo( () => , [Component, props] ); return ( {/* }> */} {SafeComponent} {/* */} ); }; const WindowWrapper = memo(WindowWrapperFC); export default WindowWrapper;