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';
|
2024-04-11 10:19:32 +03:00
|
|
|
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';
|
2020-12-14 21:05:25 +03:00
|
|
|
|
2023-08-06 19:07:03 +03:00
|
|
|
export type ShlinkVersionsContainerProps = {
|
2020-12-14 21:05:25 +03:00
|
|
|
selectedServer: SelectedServer;
|
2023-08-06 19:07:03 +03:00
|
|
|
};
|
|
|
|
|
2024-04-11 10:19:32 +03:00
|
|
|
export const ShlinkVersionsContainer = ({ selectedServer }: ShlinkVersionsContainerProps) => (
|
|
|
|
<div
|
|
|
|
className={clsx('text-center', {
|
|
|
|
'shlink-versions-container--with-sidebar': isReachableServer(selectedServer),
|
|
|
|
})}
|
|
|
|
>
|
|
|
|
<ShlinkVersions selectedServer={selectedServer} />
|
|
|
|
</div>
|
|
|
|
);
|