diff --git a/components/Editor.js b/components/Editor.js index 3babc13..fed9939 100644 --- a/components/Editor.js +++ b/components/Editor.js @@ -2,7 +2,6 @@ import url from 'url' import React from 'react' import domtoimage from 'dom-to-image' -import Spinner from 'react-spinner' import dynamic from 'next/dynamic' import Dropzone from 'dropperx' @@ -15,6 +14,7 @@ import Carbon from './Carbon' import ExportMenu from './ExportMenu' import Themes from './Themes' import TweetButton from './TweetButton' +import SpinnerWrapper from './SpinnerWrapper' import { LANGUAGES, LANGUAGE_MIME_HASH, @@ -43,8 +43,7 @@ class Editor extends React.Component { super(props) this.state = { ...DEFAULT_SETTINGS, - preset: DEFAULT_PRESET_ID, - loading: true + preset: DEFAULT_PRESET_ID } this.export = this.export.bind(this) @@ -84,8 +83,7 @@ class Editor extends React.Component { // Load from localStorage ...getSettings(localStorage), // and then URL params - ...initialState, - loading: false + ...initialState } // Makes sure the slash in 'application/X' is decoded @@ -273,7 +271,6 @@ class Editor extends React.Component { render() { const { - loading, theme, language, backgroundColor, @@ -285,25 +282,10 @@ class Editor extends React.Component { exportSize } = this.state - if (loading) { - return ( -