From a931c9298f676578b991a55231c19266bd4206cc Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 13 Sep 2024 20:51:15 +0200 Subject: [PATCH] Fix eslint errors --- src/components/Upload/Upload.tsx | 2 +- src/components/Upload/worker.ts | 5 ++--- stories/Upload.stories.tsx | 1 - stories/sdk.ts | 1 - 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/Upload/Upload.tsx b/src/components/Upload/Upload.tsx index 6a8d952..75f17f6 100644 --- a/src/components/Upload/Upload.tsx +++ b/src/components/Upload/Upload.tsx @@ -6,7 +6,7 @@ import { UploadFile } from "./UploadFile.tsx"; import { useUploadStategy } from "./useUploadStrategy.ts"; import { classnames } from "../utils/classnames.ts"; import { ButtonIcon } from "../ButtonIcon/ButtonIcon.tsx"; -import { CodexData, UploadResponse } from "@codex-storage/sdk-js"; +import { CodexData } from "@codex-storage/sdk-js"; import { SimpleText } from "../SimpleText/SimpleText.tsx"; interface CustomStyleCSS extends CSSProperties { diff --git a/src/components/Upload/worker.ts b/src/components/Upload/worker.ts index 0229d97..3b20093 100644 --- a/src/components/Upload/worker.ts +++ b/src/components/Upload/worker.ts @@ -22,9 +22,8 @@ self.addEventListener("message", function (e) { }); }; - return codex - .data() - .then((data) => data.upload(rest.file, onProgress)) + return codex.data + .upload(rest.file, onProgress) .then((result) => { abort = result.abort; diff --git a/stories/Upload.stories.tsx b/stories/Upload.stories.tsx index 6cfc02f..c300698 100644 --- a/stories/Upload.stories.tsx +++ b/stories/Upload.stories.tsx @@ -1,6 +1,5 @@ import type { Meta } from "@storybook/react"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import { Codex, CodexData, UploadResponse } from "@codex-storage/sdk-js"; import { Upload } from "../src/components/Upload/Upload"; import { fn } from "@storybook/test"; import "./Upload.stories.css"; diff --git a/stories/sdk.ts b/stories/sdk.ts index 5fafce2..27ad994 100644 --- a/stories/sdk.ts +++ b/stories/sdk.ts @@ -1,4 +1,3 @@ -import { Codex } from "@codex-storage/sdk-js"; import { CodexData, UploadResponse } from "@codex-storage/sdk-js"; class CodexDataMock extends CodexData {