import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Button } from 'reactstrap';
import './styles.scss';

class EditPage extends Component {
  render () {
    return (
      <div id='edit-page'>
        <Button color="primary" onClick={this.openEditModal}>
          Edit Page
          <i className='far fa-edit' />
        </Button>
      </div>
    )
  }

  openEditModal = () => {
    window.__editData = this.props.data;
    this.props.history.push('?edit=1');
  };
}

EditPage.propTypes = {
  data: PropTypes.object.isRequired,
  history: PropTypes.object.isRequired
};

export default EditPage;

@@ -33,17 +33,16 @@
  'react'
-;
 %0Aimport 
@@ -68,17 +68,16 @@
 p-types'
-;
 %0Aimport 
@@ -104,17 +104,16 @@
 ctstrap'
-;
 %0Aimport 
@@ -127,17 +127,16 @@
 es.scss'
-;
 %0A%0Aclass 
@@ -244,17 +244,17 @@
 lor=
-%22
+'
 primary
-%22
+'
  onC
@@ -447,17 +447,16 @@
 ops.data
-;
 %0A    thi
@@ -490,14 +490,12 @@
 =1')
-;
 %0A  %7D
-;
 %0A%7D%0A%0A
@@ -594,17 +594,16 @@
 quired%0A%7D
-;
 %0A%0Aexport
@@ -623,6 +623,5 @@
 Page
-;
 %0A

Update index.js