Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 17, 2023
1 parent 1f64edd commit 4dadf95
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/renderer/src/stories/pages/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
5 changes: 2 additions & 3 deletions src/renderer/src/stories/pages/settings/SettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand All @@ -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();
},
});
Expand Down
10 changes: 8 additions & 2 deletions src/renderer/src/stories/pages/uploads/UploadsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4dadf95

Please sign in to comment.