CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/account/util.ts
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { alert_message } from "@cocalc/frontend/alerts";
7
import { redux } from "@cocalc/frontend/app-framework";
8
9
export function set_account_table(obj: object): void {
10
redux.getTable("account").set(obj);
11
}
12
13
export function ugly_error(err: any): void {
14
if (typeof err != "string") {
15
err = JSON.stringify(err);
16
}
17
alert_message({ type: "error", message: `Settings error -- ${err}` });
18
}
19
20