Deleted ForServerVersion component, which is no longer used

This commit is contained in:
Alejandro Celaya
2022-05-02 19:28:07 +02:00
parent 677f1da8df
commit 337bfc47c1
6 changed files with 3 additions and 71 deletions

View File

@@ -1,26 +0,0 @@
import { FC, PropsWithChildren } from 'react';
import { versionMatch, Versions } from '../../utils/helpers/version';
import { isReachableServer, SelectedServer } from '../data';
export type ForServerVersionProps = PropsWithChildren<Versions>;
interface ForServerVersionConnectProps extends ForServerVersionProps {
selectedServer: SelectedServer;
}
export const ForServerVersion: FC<ForServerVersionConnectProps> = (
{ minVersion, maxVersion, selectedServer, children },
) => {
if (!isReachableServer(selectedServer)) {
return null;
}
const { version } = selectedServer;
const matchesVersion = versionMatch(version, { maxVersion, minVersion });
if (!matchesVersion) {
return null;
}
return <>{children}</>;
};