Skip to content
Snippets Groups Projects
Unverified Commit da829723 authored by Raphael Krut-Landau's avatar Raphael Krut-Landau Committed by GitHub
Browse files

fix(browse): Remove some dead code (#46861)

parent 0d50f7b1
No related branches found
No related tags found
No related merge requests found
......@@ -8,30 +8,6 @@ import { getCollectionName } from "../utils";
import { pathSeparatorChar } from "./constants";
export const getBreadcrumbMaxWidths = (
collections: CollectionEssentials["effective_ancestors"],
totalUnitsOfWidthAvailable: number,
isPathEllipsified: boolean,
) => {
if (!collections || collections.length < 2) {
return [];
}
const lengths = collections.map(
collection => getCollectionName(collection).length,
);
const ratio = lengths[0] / (lengths[0] + lengths[1]);
const firstWidth = Math.max(
Math.round(ratio * totalUnitsOfWidthAvailable),
25,
);
const secondWidth = totalUnitsOfWidthAvailable - firstWidth;
const padding = isPathEllipsified ? "2rem" : "1rem";
return [
`calc(${firstWidth}cqw - ${padding})`,
`calc(${secondWidth}cqw - ${padding})`,
];
};
export const isModel = (item: SearchResult) => item.model === "dataset";
export const getModelDescription = (item: SearchResult) => {
......
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