import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import configureStore from './store/configureStore';
import App from './containers/App';
import Replacer from './components/Replacer';

const store = configureStore();

const root = document.getElementById('root');
if (root) {
  render(
    <Provider store={store}>
      <App />
    </Provider>,
    root
  );
}

const replacer = document.getElementById('replacer');
if (replacer) {
  render(
    <Replacer />,
    replacer
  );
}

@@ -1,16 +1,59 @@
+/* global document */%0Aimport fs from 'fs';%0A
 import React fro
@@ -273,16 +273,72 @@
 placer';
+%0Aimport %7B openFolder, openFile %7D from './actions/files';
 %0A%0Aconst 
@@ -621,14 +621,452 @@
 placer%0A  );%0A
-
 %7D%0A
+%0Adocument.addEventListener('drop', (e) =%3E %7B%0A  e.preventDefault();%0A  e.stopPropagation();%0A  for (const f of e.dataTransfer.files) %7B%0A    const stat = fs.statSync(f.path);%0A    if (stat.isFile()) %7B%0A      store.dispatch(openFile(f.path));%0A    %7D%0A    if (stat.isDirectory()) %7B%0A      store.dispatch(openFolder(f.path));%0A    %7D%0A  %7D%0A  return false;%0A%7D);%0Adocument.addEventListener('dragover', (e) =%3E %7B%0A  e.preventDefault();%0A  e.stopPropagation();%0A%7D);%0A

Allow dragging files/folders onto the app