mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2025-12-06 00:20:05 +01:00
22 lines
575 B
TypeScript
22 lines
575 B
TypeScript
import type { ComponentProcessProps } from "components/system/Apps/RenderComponent";
|
|
import FileManager from "components/system/Files/FileManager";
|
|
import { useProcesses } from "contexts/process";
|
|
import { useEffect } from "react";
|
|
|
|
const FileExplorer = ({ id }: ComponentProcessProps): JSX.Element => {
|
|
const {
|
|
title,
|
|
processes: { [id]: { url = "" } = {} },
|
|
} = useProcesses();
|
|
|
|
useEffect(() => {
|
|
if (url) {
|
|
title(id, url);
|
|
}
|
|
}, [id, url, title]);
|
|
|
|
return url ? <FileManager url={url} view="icon" /> : <></>;
|
|
};
|
|
|
|
export default FileExplorer;
|