One line conditions

This commit is contained in:
Dustin Brett
2021-08-21 22:48:26 -07:00
parent 347e9777a8
commit 5b2dfc527e
3 changed files with 3 additions and 9 deletions

View File

@@ -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" /> : <></>;

View File

@@ -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);

View File

@@ -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);
};