daedalOS/components/system/Desktop/index.tsx
Dustin Brett 24c17c0088
Some checks failed
Tests / tests (push) Has been cancelled
Add memo to everything
2025-07-01 09:10:22 -07:00

28 lines
727 B
TypeScript

import { memo, useRef } from "react";
import StyledDesktop from "components/system/Desktop/StyledDesktop";
import useWallpaper from "components/system/Desktop/Wallpapers/useWallpaper";
import FileManager from "components/system/Files/FileManager";
import { DESKTOP_PATH } from "utils/constants";
const Desktop: FC = ({ children }) => {
const desktopRef = useRef<HTMLElement | null>(null);
useWallpaper(desktopRef);
return (
<StyledDesktop ref={desktopRef}>
<FileManager
url={DESKTOP_PATH}
allowMovingDraggableEntries
hideLoading
hideScrolling
isDesktop
loadIconsImmediately
/>
{children}
</StyledDesktop>
);
};
export default memo(Desktop);