diff --git a/CHANGELOG.md b/CHANGELOG.md index 32a7428e..9ec565f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org). -## [Unreleased] +## [4.1.1] - 2024-04-11 ### Added * [shlink-web-component#293](https://github.com/shlinkio/shlink-web-component/issues/293) Allow ordering redirect rules via drag'n'drop. @@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Fixed * [shlink-web-component#294](https://github.com/shlinkio/shlink-web-component/issues/294) Make sure "validate URL" control is not displayed in short URL creation/edition, when consuming Shlink >=4.0.0. * [#1130](https://github.com/shlinkio/shlink-web-client/issues/1130) Fix importing servers in Firefox for Android when the CSV file contains spaces. +* [#1133](https://github.com/shlinkio/shlink-web-client/issues/1133) Fix Shlink versions alignment in server error pages. ## [4.1.0] - 2024-03-17 diff --git a/src/common/ShlinkVersionsContainer.tsx b/src/common/ShlinkVersionsContainer.tsx index c62a9007..b1756057 100644 --- a/src/common/ShlinkVersionsContainer.tsx +++ b/src/common/ShlinkVersionsContainer.tsx @@ -1,7 +1,6 @@ import { clsx } from 'clsx'; -import { useMemo } from 'react'; -import { useLocation } from 'react-router-dom'; import type { SelectedServer } from '../servers/data'; +import { isReachableServer } from '../servers/data'; import { ShlinkVersions } from './ShlinkVersions'; import './ShlinkVersionsContainer.scss'; @@ -9,19 +8,12 @@ export type ShlinkVersionsContainerProps = { selectedServer: SelectedServer; }; -const SHLINK_CONTAINER_PATH_PATTERN = /^\/server\/[a-zA-Z0-9-]*\/(?!edit)/; - -export const ShlinkVersionsContainer = ({ selectedServer }: ShlinkVersionsContainerProps) => { - const { pathname } = useLocation(); - const withPadding = useMemo(() => SHLINK_CONTAINER_PATH_PATTERN.test(pathname), [pathname]); - - const classes = clsx('text-center', { - 'shlink-versions-container--with-sidebar': withPadding, - }); - - return ( -