diff --git a/client/components/AddRemoveButton.jsx b/client/components/AddRemoveButton.jsx index f0ec1272..7350c177 100644 --- a/client/components/AddRemoveButton.jsx +++ b/client/components/AddRemoveButton.jsx @@ -1,17 +1,20 @@ import React from 'react'; import PropTypes from 'prop-types'; -import InlineSVG from 'react-inlinesvg'; -const addIcon = require('../images/plus.svg'); -const removeIcon = require('../images/minus.svg'); +import AddIcon from '../images/plus.svg'; +import RemoveIcon from '../images/minus.svg'; const AddRemoveButton = ({ type, onClick }) => { - const alt = type === 'add' ? 'add to collection' : 'remove from collection'; - const icon = type === 'add' ? addIcon : removeIcon; + const alt = type === 'add' ? 'Add to collection' : 'Remove from collection'; + const Icon = type === 'add' ? AddIcon : RemoveIcon; return ( - ); }; diff --git a/client/components/Nav.jsx b/client/components/Nav.jsx index a34b9e46..eb5ef944 100644 --- a/client/components/Nav.jsx +++ b/client/components/Nav.jsx @@ -3,7 +3,6 @@ import React from 'react'; import { connect } from 'react-redux'; import { withRouter } from 'react-router'; import { Link } from 'react-router'; -import InlineSVG from 'react-inlinesvg'; import classNames from 'classnames'; import * as IDEActions from '../modules/IDE/actions/ide'; import * as toastActions from '../modules/IDE/actions/toast'; @@ -12,10 +11,10 @@ import { setAllAccessibleOutput } from '../modules/IDE/actions/preferences'; import { logoutUser } from '../modules/User/actions'; import { metaKeyName, } from '../utils/metaKey'; -import caretLeft from '../images/left-arrow.svg'; -const triangleUrl = require('../images/down-filled-triangle.svg'); -const logoUrl = require('../images/p5js-logo-small.svg'); +import CaretLeftIcon from '../images/left-arrow.svg'; +import TriangleIcon from '../images/down-filled-triangle.svg'; +import LogoIcon from '../images/p5js-logo-small.svg'; const __process = (typeof global !== 'undefined' ? global : window).process; @@ -229,11 +228,11 @@ class Nav extends React.PureComponent { return (