From 4dadf95e6f753486ffa6f8894432f0f239aabb78 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 21:43:04 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/renderer/src/stories/pages/Page.js | 2 +- .../src/stories/pages/settings/SettingsPage.js | 5 ++--- src/renderer/src/stories/pages/uploads/UploadsPage.js | 10 ++++++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/renderer/src/stories/pages/Page.js b/src/renderer/src/stories/pages/Page.js index 08e49c592..50f962a65 100644 --- a/src/renderer/src/stories/pages/Page.js +++ b/src/renderer/src/stories/pages/Page.js @@ -58,7 +58,7 @@ export class Page extends LitElement { notify = (...args) => { const ref = notify(...args); this.#notifications.push(ref); - return ref + return ref; }; to = async (transition) => { diff --git a/src/renderer/src/stories/pages/settings/SettingsPage.js b/src/renderer/src/stories/pages/settings/SettingsPage.js index b824b1872..d610f96ac 100644 --- a/src/renderer/src/stories/pages/settings/SettingsPage.js +++ b/src/renderer/src/stories/pages/settings/SettingsPage.js @@ -37,7 +37,7 @@ export class SettingsPage extends Page { #openNotyf = (message, type) => { if (this.#notification) notyf.dismiss(this.#notification); - return (this.#notification = this.notify(message,type)); + return (this.#notification = this.notify(message, type)); }; beforeSave = () => { @@ -60,8 +60,7 @@ export class SettingsPage extends Page { const button = new Button({ label: "Save Changes", onClick: async () => { - if (!this.unsavedUpdates) - return this.#openNotyf("All changes were already saved", "success"); + if (!this.unsavedUpdates) return this.#openNotyf("All changes were already saved", "success"); this.save(); }, }); diff --git a/src/renderer/src/stories/pages/uploads/UploadsPage.js b/src/renderer/src/stories/pages/uploads/UploadsPage.js index 0c53b7b7b..6ddefb19c 100644 --- a/src/renderer/src/stories/pages/uploads/UploadsPage.js +++ b/src/renderer/src/stories/pages/uploads/UploadsPage.js @@ -48,11 +48,17 @@ export async function uploadToDandi(info, type = "project" in info ? "project" : }, { title: "Uploading to DANDI" } ).catch((e) => { - this.notify(e.message, 'error'); + this.notify(e.message, "error"); throw e; }); - if (result) this.notify(`${info.project ?? `${info[folderPathKey].length} filesystem entries`} successfully uploaded to Dandiset ${dandiset_id}`, "success"); + if (result) + this.notify( + `${ + info.project ?? `${info[folderPathKey].length} filesystem entries` + } successfully uploaded to Dandiset ${dandiset_id}`, + "success" + ); return result; }