import React from 'react';
import App from './App';

import { createStore, StoreContext } from './store';
import * as types from './types/app'

export interface UploadProps {
  headers?:any;
  apiUrls?:types.ApiUrls;
  attachPrefix?:string;
}
export default (props: any)=>{
  const { headers, ...rest } = props
  const store = createStore(headers)
  return (
    <StoreContext.Provider value={store}>
      <App {...rest} />
    </StoreContext.Provider>
  )
}