mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2026-01-15 12:15:02 +00:00
20 lines
561 B
TypeScript
20 lines
561 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;
|