aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/CurrentUserUtils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/util/CurrentUserUtils.ts')
-rw-r--r--src/client/util/CurrentUserUtils.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts
index 199ef701d..c0318e86b 100644
--- a/src/client/util/CurrentUserUtils.ts
+++ b/src/client/util/CurrentUserUtils.ts
@@ -1226,6 +1226,13 @@ export class CurrentUserUtils {
Doc.UserDoc().activeDashboard = undefined;
}
+ public static async removeDashboard(dashboard: Doc) {
+ const dashboards = await DocListCastAsync(CurrentUserUtils.MyDashboards.data);
+ if (dashboards && dashboards.length > 0) {
+ Doc.RemoveDocFromList(CurrentUserUtils.MyDashboards, "data", dashboard);
+ }
+ }
+
public static createNewDashboard = async (userDoc: Doc, id?: string, name?: string) => {
console.log(name)
const presentation = Doc.MakeCopy(userDoc.emptyPresentation as Doc, true);