import { useProcesses } from "contexts/process"; import { AnimatePresence } from "framer-motion"; import dynamic from "next/dynamic"; import { memo } from "react"; const RenderComponent = dynamic( () => import("components/system/Apps/RenderComponent") ); const AppsLoader: FC = () => { const { processes = {} } = useProcesses(); return ( {Object.entries(processes).map( ([id, { closing, Component, hasWindow }]) => id && Component && !closing && ( ) )} ); }; export default memo(AppsLoader);