From 611d90f557140c442e4066e396d8c12ce4c340d3 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Sat, 22 Aug 2020 01:16:23 +0300
Subject: refactor!: rewrite code without react-sage

---
 src/components/FileUpload/FileUpload.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/components/FileUpload/FileUpload.tsx')

diff --git a/src/components/FileUpload/FileUpload.tsx b/src/components/FileUpload/FileUpload.tsx
index 6a31656..d455f62 100644
--- a/src/components/FileUpload/FileUpload.tsx
+++ b/src/components/FileUpload/FileUpload.tsx
@@ -1,7 +1,7 @@
 import React, { useRef } from 'react';
-import { utils } from 'react-sage';
 import Button from '@material-ui/core/Button';
 import CloudUpload from '@material-ui/icons/CloudUpload';
+import { getLocalFileUrl } from '../../utils/files';
 
 interface PropTypes {
   callback: (fileUrl: string, file: File) => void;
@@ -15,7 +15,7 @@ const FileUpload: React.FC<PropTypes> = ({ callback, children }) => {
     const files = event.target?.files;
     if (files?.length) {
       const file = files[0];
-      utils.loadFile(file).then(url => callback(url, file));
+      getLocalFileUrl(file).then(url => callback(url, file));
     };
   };
 
-- 
cgit v1.2.3

