import { FC } from 'react'; import { Link } from 'react-router-dom'; import Message from '../../utils/Message'; import ServersListGroup from '../ServersListGroup'; import { DeleteServerButtonProps } from '../DeleteServerButton'; import { isServerWithId, SelectedServer, ServersMap } from '../data'; import { NoMenuLayout } from '../../common/NoMenuLayout'; import './ServerError.scss'; interface ServerErrorProps { servers: ServersMap; selectedServer: SelectedServer; } export const ServerError = (DeleteServerButton: FC): FC => ( { servers, selectedServer }, ) => (
{!isServerWithId(selectedServer) && 'Could not find this Shlink server.'} {isServerWithId(selectedServer) && ( <>

Oops! Could not connect to this Shlink server.

Make sure you have internet connection, and the server is properly configured and on-line. )}
These are the Shlink servers currently configured. Choose one of them or add a new one. {isServerWithId(selectedServer) && (
Alternatively, if you think you may have miss-configured this server, you can remove it or  edit it.
)}
);