Skip to content
Snippets Groups Projects
Unverified Commit 6e2f3293 authored by Anton Kulyk's avatar Anton Kulyk Committed by GitHub
Browse files

Open chill-mode when clicking bookmarked model (#25515)

* Open chill-mode when clicking bookmarked model

* Fix unit test
parent 3d255daf
No related branches found
No related tags found
No related merge requests found
import slugg from "slugg";
import {
isDataAppBookmark,
isModelBookmark,
} from "metabase/entities/bookmarks";
import { isDataAppBookmark } from "metabase/entities/bookmarks";
import { Bookmark, DataApp } from "metabase-types/api";
......@@ -27,10 +24,6 @@ export function bookmark(bookmark: Bookmark) {
);
}
if (isModelBookmark(bookmark)) {
return `/model/${itemId}/detail`;
}
const basePath = getBookmarkBasePath(bookmark);
const itemPath = appendSlug(itemId, slugg(bookmark.name));
return `/${basePath}/${itemPath}`;
......
......@@ -290,7 +290,7 @@ describe("urls", () => {
name: "Product",
type: "card",
}),
).toBe("/model/1/detail");
).toBe("/model/1-product");
});
it("returns dashboard bookmark path", () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment