mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2026-01-15 12:15:02 +00:00
One line conditions
This commit is contained in:
@@ -10,9 +10,7 @@ const FileExplorer = ({ id }: ComponentProcessProps): JSX.Element => {
|
||||
} = useProcesses();
|
||||
|
||||
useEffect(() => {
|
||||
if (url) {
|
||||
title(id, url);
|
||||
}
|
||||
if (url) title(id, url);
|
||||
}, [id, url, title]);
|
||||
|
||||
return url ? <FileManager url={url} view="icon" /> : <></>;
|
||||
|
||||
@@ -21,9 +21,7 @@ const useV86ScreenSize = (
|
||||
?.querySelector("span:last-of-type")
|
||||
?.getBoundingClientRect() || {};
|
||||
|
||||
if (height && width) {
|
||||
updateWindowSize(rows * height, width);
|
||||
}
|
||||
if (height && width) updateWindowSize(rows * height, width);
|
||||
};
|
||||
|
||||
emulator?.add_listener?.(SET_SCREEN_GFX, setScreenGfx);
|
||||
|
||||
@@ -34,9 +34,7 @@ const TaskbarEntry = ({ icon, id, title }: TaskbarEntryProps): JSX.Element => {
|
||||
const hidePeek = (): void => setPeekVisible(false);
|
||||
const showPeek = (): void => setPeekVisible(true);
|
||||
const onClick = (): void => {
|
||||
if (minimized || isForeground) {
|
||||
minimize(id);
|
||||
}
|
||||
if (minimized || isForeground) minimize(id);
|
||||
|
||||
setForegroundId(isForeground ? nextFocusableId : id);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user