shlink-web-client/src/common/ShlinkVersionsContainer.tsx

20 lines
615 B
TypeScript
Raw Normal View History

2023-11-01 11:41:21 +03:00
import { clsx } from 'clsx';
2023-02-18 12:40:37 +03:00
import type { SelectedServer } from '../servers/data';
import { isReachableServer } from '../servers/data';
2023-02-18 13:11:01 +03:00
import { ShlinkVersions } from './ShlinkVersions';
2020-12-15 19:57:24 +03:00
import './ShlinkVersionsContainer.scss';
export type ShlinkVersionsContainerProps = {
selectedServer: SelectedServer;
};
export const ShlinkVersionsContainer = ({ selectedServer }: ShlinkVersionsContainerProps) => (
<div
className={clsx('text-center', {
'shlink-versions-container--with-sidebar': isReachableServer(selectedServer),
})}
>
<ShlinkVersions selectedServer={selectedServer} />
</div>
);