Removing syntax map from devel.js

This commit is contained in:
Jeff Avallone 2018-05-28 12:10:15 -04:00
parent 9a10fc35e8
commit 41f10c0dc3
2 changed files with 8 additions and 11 deletions

View File

@ -8,12 +8,15 @@ import style from './style.css';
import Form from 'components/Form'; import Form from 'components/Form';
import Message from 'components/Message'; import Message from 'components/Message';
import SVG from 'components/SVG'; import SVG from 'components/SVG';
import { syntaxes, demoImage } from 'devel'; import { demoImage } from 'devel';
const syntaxes = {
js: 'JavaScript',
pcre: 'PCRE'
};
class App extends React.PureComponent { class App extends React.PureComponent {
state = { state = {}
syntaxes
}
componentDidMount() { componentDidMount() {
window.addEventListener('hashchange', this.handleHashChange); window.addEventListener('hashchange', this.handleHashChange);
@ -122,7 +125,7 @@ class App extends React.PureComponent {
imageRef = image => this.image = image imageRef = image => this.image = image
render() { render() {
const { svgUrl, pngUrl, permalinkUrl, syntax, expr, syntaxes, image } = this.state; const { svgUrl, pngUrl, permalinkUrl, syntax, expr, image } = this.state;
const downloadUrls = [ const downloadUrls = [
svgUrl, svgUrl,
pngUrl pngUrl

View File

@ -1,11 +1,6 @@
// Data used during development. // Data used during development.
// Once everything is built, this file will go away // Once everything is built, this file will go away
const syntaxes = {
js: 'JavaScript',
pcre: 'PCRE'
};
const demoImage = { const demoImage = {
type: 'Image', type: 'Image',
children: [ children: [
@ -228,6 +223,5 @@ const demoImage = {
}; };
export { export {
syntaxes,
demoImage demoImage
}; };