refactor(dashboard-v2): use memoized SkynetClient instance

This commit is contained in:
Michał Leszczyk 2022-03-29 16:08:51 +02:00
parent d3c252a0b0
commit 51c3d4af94
No known key found for this signature in database
GPG Key ID: FA123CA8BAA2FBF4
1 changed files with 1 additions and 3 deletions

View File

@ -5,12 +5,10 @@ import { StatusCodes } from "http-status-codes";
import copy from "copy-text-to-clipboard";
import path from "path-browserify";
import { useTimeoutFn } from "react-use";
import { SkynetClient } from "skynet-js";
import { ProgressBar } from "./ProgressBar";
import UploaderItemIcon from "./UploaderItemIcon";
import buildUploadErrorMessage from "./buildUploadErrorMessage";
const skynetClient = new SkynetClient("https://siasky.net"); //TODO: proper API url
import skynetClient from "../../services/skynetClient";
const getFilePath = (file) => file.webkitRelativePath || file.path || file.name;