shlink-web-client/src/common/ShlinkVersionsContainer.tsx
2024-04-11 09:19:32 +02:00

19 lines
615 B
TypeScript

import { clsx } from 'clsx';
import type { SelectedServer } from '../servers/data';
import { isReachableServer } from '../servers/data';
import { ShlinkVersions } from './ShlinkVersions';
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>
);