mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2025-12-06 00:20:05 +01:00
This commit is contained in:
parent
4312d31c7a
commit
49931ff0b3
|
|
@ -4,7 +4,6 @@ import { type ComponentProcessProps } from "components/system/Apps/RenderCompone
|
|||
import { useFileSystem } from "contexts/fileSystem";
|
||||
import { useProcesses } from "contexts/process";
|
||||
import { TRANSITIONS_IN_MILLISECONDS } from "utils/constants";
|
||||
import { haltEvent } from "utils/functions";
|
||||
|
||||
const ONE_TIME_PASSIVE_CAPTURE_EVENT = {
|
||||
capture: true,
|
||||
|
|
@ -41,18 +40,13 @@ const ScreenSaver: FC<ComponentProcessProps> = ({ id }) => {
|
|||
}),
|
||||
[readFile, url]
|
||||
);
|
||||
const closeScreenSaver = useCallback(
|
||||
(event?: Event) => {
|
||||
if (event) haltEvent(event);
|
||||
const closeScreenSaver = useCallback(() => {
|
||||
if (iframeRef.current) {
|
||||
iframeRef.current.style.display = "none";
|
||||
}
|
||||
|
||||
if (iframeRef.current) {
|
||||
iframeRef.current.style.display = "none";
|
||||
}
|
||||
|
||||
close(id);
|
||||
},
|
||||
[close, id]
|
||||
);
|
||||
close(id);
|
||||
}, [close, id]);
|
||||
|
||||
useEffect(() => {
|
||||
if (url && !srcDoc[url]) loadScreenSaver();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user