feat: refactoring modules
Some checks failed
Publish Metadata Agent Image / build-and-push-image (push) Successful in 1m12s
Publish Web Player Image / build-and-push-image (push) Has been cancelled
Publish Server Image / build-and-push-image (push) Has been cancelled

This commit is contained in:
Boris Cherepanov
2026-03-19 17:31:09 +03:00
parent 4f239c2546
commit d654fe9442
7 changed files with 1787 additions and 59 deletions

View File

@@ -0,0 +1,30 @@
type Crumb = {
label: string
action?: () => void
}
type BreadcrumbsProps = {
items: Crumb[]
}
export function Breadcrumbs({ items }: BreadcrumbsProps) {
if (!items.length) return null
return (
<div className="breadcrumb">
{items.map((item, index) => {
const isLast = index === items.length - 1
return (
<span key={`${item.label}-${index}`}>
{!isLast && item.action ? (
<span onClick={item.action}>{item.label}</span>
) : (
<span>{item.label}</span>
)}
{!isLast ? ' / ' : ''}
</span>
)
})}
</div>
)
}