import React, { PropTypes } from 'react'; import InlineSVG from 'react-inlinesvg'; const exitUrl = require('../../../images/exit.svg'); import { Link } from 'react-router'; class ErrorModal extends React.Component { componentDidMount() { this.refs.modal.focus(); } 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 is out of date. Please refresh the page.

); } render() { return (

Error

{(() => { // 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, closeModal: PropTypes.func.isRequired }; export default ErrorModal;