{"size": 1280, "ext": "js", "max_stars_repo_path": "src/demo/UploadEditorTest.js", "max_stars_repo_name": "aaristotle75/givebox-lib", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/demo/UploadEditorTest.js", "max_issues_repo_name": "aaristotle75/givebox-lib", "max_issues_repo_issues_event_min_datetime": "2021-01-13T13:52:22.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-28T02:36:23.000Z", "max_forks_repo_path": "src/demo/UploadEditorTest.js", "max_forks_repo_name": "aaristotle75/givebox-lib", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 5, "max_forks_count": null, "avg_line_length": 24.1509433962, "max_line_length": 143, "alphanum_fraction": 0.6453125}
/* eslint-disable */
import React, { Component } from 'react';
import * as util from '../lib/common/utility';
import MediaLibrary from '../lib/form/MediaLibrary';
import 'react-resizable/css/styles.css';

export default class UploadEditorTest extends Component {

  constructor(props) {
    super(props);
    this.closeModalAndSave = this.closeModalAndSave.bind(this);
    this.handleSaveCallback = this.handleSaveCallback.bind(this);
    this.state = {
      url: 'https://givebox-staging.s3.amazonaws.com/gbx%2F9b28b33157275cf5c8fa036633a3b33d%2F2018-11-09%2Fwesome1-jpg-original-jpg%2Foriginal'
    };
  }

  closeModalAndSave() {
    console.log('execute closeModalAndSave');
  }

  handleSaveCallback(url) {
    console.log('execute handleSaveCallback', url);
  }

  render() {

    const {
      url
    } = this.state;

    const library = {
      orgID: 185,
      articleID: 4,
      type: 'article',
      borderRadius: 0
    }

    return (
      <div className='gbx3 editable fieldGroup'>
        <MediaLibrary
          image={url}
          preview={url}
          handleSaveCallback={this.handleSaveCallback}
          handleSave={util.handleFile}
          library={library}
          closeModalAndSave={this.closeModalAndSave}
        />
      </div>
    )
  }
}
