mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-18 21:43:49 +00:00
Deleted ForServerVersion component, which is no longer used
This commit is contained in:
@@ -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}</>;
|
||||
};
|
||||
Reference in New Issue
Block a user