import PropTypes from 'prop-types'; import React from 'react'; import { Link } from 'react-router'; class ErrorModal extends React.Component { forceAuthentication() { return (

In order to save sketches, you must be logged in. Please  Login  or  Sign Up.

); } staleSession() { return (

It looks like you've been logged out. Please  log in.

); } staleProject() { return (

The project you have attempted to save has been saved from another window. Please refresh the page to see the latest version.

); } render() { return (
{(() => { // eslint-disable-line if (this.props.type === 'forceAuthentication') { return this.forceAuthentication(); } else if (this.props.type === 'staleSession') { return this.staleSession(); } else if (this.props.type === 'staleProject') { return this.staleProject(); } })()}
); } } ErrorModal.propTypes = { type: PropTypes.string.isRequired, closeModal: PropTypes.func.isRequired }; export default ErrorModal;