import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import Message from '../../utils/Message'; import ServersListGroup from '../ServersListGroup'; import { serverType } from '../prop-types'; import './ServerError.scss'; const propTypes = { servers: PropTypes.object, selectedServer: serverType, type: PropTypes.oneOf([ 'not-found', 'not-reachable' ]).isRequired, }; export const ServerError = (DeleteServerButton) => { const ServerErrorComp = ({ type, servers: { list }, selectedServer }) => (
{type === 'not-found' && 'Could not find this Shlink server.'} {type === 'not-reachable' && (

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. {type === 'not-reachable' && (
Alternatively, if you think you may have miss-configured this server, you can remove it or  edit it.
)}
); ServerErrorComp.propTypes = propTypes; return ServerErrorComp; };