mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2026-01-15 12:15:02 +00:00
Null instead of empty fragments
This commit is contained in:
@@ -114,7 +114,6 @@
|
||||
"react/hook-use-state": "error",
|
||||
"react-hooks/exhaustive-deps": "error",
|
||||
"react/jsx-filename-extension": ["error", { "extensions": [".tsx"] }],
|
||||
"react/jsx-no-useless-fragment": "off",
|
||||
"react/jsx-props-no-spreading": "off",
|
||||
"react/jsx-sort-props": [
|
||||
"error",
|
||||
|
||||
@@ -81,9 +81,8 @@ const FileExplorer: FC<ComponentProcessProps> = ({ id }) => {
|
||||
<Navigation hideSearch={isMounted} id={id} />
|
||||
<FileManager id={id} url={url} view="icon" showStatusBar />
|
||||
</StyledFileExplorer>
|
||||
) : (
|
||||
<></>
|
||||
);
|
||||
) : // eslint-disable-next-line unicorn/no-null
|
||||
null;
|
||||
};
|
||||
|
||||
export default FileExplorer;
|
||||
|
||||
@@ -133,9 +133,8 @@ const Menu: FC<MenuProps> = ({ subMenu }) => {
|
||||
))}
|
||||
</ol>
|
||||
</StyledMenu>
|
||||
) : (
|
||||
<></>
|
||||
);
|
||||
) : // eslint-disable-next-line unicorn/no-null
|
||||
null;
|
||||
};
|
||||
|
||||
export default Menu;
|
||||
|
||||
@@ -156,7 +156,8 @@ const Clock: FC = () => {
|
||||
}
|
||||
}, [currentWorker, supportsOffscreenCanvas]);
|
||||
|
||||
if (!time) return <></>;
|
||||
// eslint-disable-next-line unicorn/no-null
|
||||
if (!time) return null;
|
||||
|
||||
return (
|
||||
<StyledClock
|
||||
|
||||
@@ -65,9 +65,8 @@ const PeekWindow: FC<PeekWindowProps> = ({ id }) => {
|
||||
<CloseIcon />
|
||||
</Button>
|
||||
</StyledPeekWindow>
|
||||
) : (
|
||||
<></>
|
||||
);
|
||||
) : // eslint-disable-next-line unicorn/no-null
|
||||
null;
|
||||
};
|
||||
|
||||
export default PeekWindow;
|
||||
|
||||
@@ -117,7 +117,8 @@ const Icon = forwardRef<
|
||||
failedUrls.length > 0 &&
|
||||
failedUrls.includes(srcSet.split(" ")[0])
|
||||
) {
|
||||
return <></>;
|
||||
// eslint-disable-next-line unicorn/no-null
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
2
utils/types.d.ts
vendored
2
utils/types.d.ts
vendored
@@ -4,7 +4,7 @@
|
||||
|
||||
type FC<TProps = Record<string, unknown>> = (
|
||||
props: React.PropsWithChildren<TProps>
|
||||
) => JSX.Element;
|
||||
) => JSX.Element | null;
|
||||
|
||||
type HTMLElementWithPriority<T> = T & {
|
||||
fetchPriority?: "auto" | "high" | "low";
|
||||
|
||||
Reference in New Issue
Block a user