mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-02-28 20:56:42 +00:00
Extracted servers list group from home component to a reusable component
This commit is contained in:
@@ -6,7 +6,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import classNames from 'classnames';
|
||||
import * as PropTypes from 'prop-types';
|
||||
import { serverType } from '../servers/prop-types';
|
||||
import MutedMessage from '../utils/MutedMessage';
|
||||
import Message from '../utils/Message';
|
||||
import NotFound from './NotFound';
|
||||
import './MenuLayout.scss';
|
||||
|
||||
@@ -28,19 +28,19 @@ const MenuLayout = (TagsList, ShortUrls, AsideMenu, CreateShortUrl, ShortUrlVisi
|
||||
useEffect(() => setShowSidebar(false), [ location ]);
|
||||
|
||||
if (!selectedServer) {
|
||||
return <MutedMessage loading />;
|
||||
return <Message loading />;
|
||||
}
|
||||
|
||||
if (selectedServer.serverNotFound) {
|
||||
return <MutedMessage>Could not find a server with id <b>"{serverId}"</b> in this host.</MutedMessage>;
|
||||
return <Message type="error">Could not find this Shlink server in this host.</Message>;
|
||||
}
|
||||
|
||||
if (selectedServer.serverNotReachable) {
|
||||
return (
|
||||
<MutedMessage>
|
||||
Oops! Could not connect to Shlink server with ID <b>"{serverId}"</b>. Make sure you have internet
|
||||
connection, the server is properly configured and it is on-line.
|
||||
</MutedMessage>
|
||||
<Message type="error">
|
||||
<p>Oops! Could not connect to this Shlink server.</p>
|
||||
Make sure you have internet connection, and the server is properly configured and on-line.
|
||||
</Message>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user