Skip to content

Commit

Permalink
Remove archive code due to build issues. Add breadcrumbs fix for pods…
Browse files Browse the repository at this point in the history
…/images
  • Loading branch information
NotChristianGarcia committed Jul 15, 2024
1 parent b794e70 commit f04e51b
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 433 deletions.
24 changes: 17 additions & 7 deletions lib/tapisui-common/src/ui/Breadcrumbs/breadcrumbsFromPathname.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,23 @@ import normalize from 'normalize-path';

const breadcrumbsFromPathname = (pathname: string) => {
const items: Array<BreadcrumbType> = [];
const pathParts = pathname.split('/');
pathParts.forEach((_, index) => {
let to = normalize('/' + pathParts.slice(0, index + 1).join('/') + '/');
if (pathParts[index].length) {
items.push({ to, text: pathParts[index] });
}
});
if (pathname.startsWith('/pods/images')) {
// special case - images urls can have slashes in them
const image = pathname.replace('/pods/images/', '');
console.log(image);
items.push({ to: normalize('/pods/'), text: 'pods' });
items.push({ to: normalize('/pods/images/'), text: 'images' });
items.push({ to: normalize(`/pods/images/${image}/`), text: image });
} else {
// Original logic
const pathParts = pathname.split('/');
pathParts.forEach((_, index) => {
let to = normalize('/' + pathParts.slice(0, index + 1).join('/') + '/');
if (pathParts[index].length) {
items.push({ to, text: pathParts[index] });
}
});
}
return items;
};

Expand Down
1 change: 0 additions & 1 deletion src/app/Pods/_Router/Router.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

273 changes: 0 additions & 273 deletions src/app/Pods/_components/PodDetailArchive/PodPage.tsx

This file was deleted.

17 changes: 0 additions & 17 deletions src/app/Pods/_components/PodDetailArchive/PodPagel.module.scss

This file was deleted.

1 change: 0 additions & 1 deletion src/app/Pods/_components/PodDetailArchive/index.ts

This file was deleted.

This file was deleted.

Loading

0 comments on commit f04e51b

Please sign in to comment.