securityos/components/system/Desktop/index.tsx

30 lines
789 B
TypeScript

import StyledDesktop from "components/system/Desktop/StyledDesktop";
import useWallpaper from "components/system/Desktop/Wallpapers/useWallpaper";
import FileManager from "components/system/Files/FileManager";
import { useRef } from "react";
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}
view="icon"
allowMovingDraggableEntries
hideLoading
hideScrolling
isDesktop
loadIconsImmediately
preloadShortcuts
/>
{children}
</StyledDesktop>
);
};
export default Desktop;