Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/components/layout/main-breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,27 @@ export function MainBreadcrumbs({ pathname, currentLabel }: MainBreadcrumbsProps
<>
<JsonLd data={buildBreadcrumbJsonLd(items)} />
<nav aria-label="현재 위치" className="min-w-0">
<ol className="flex min-w-0 flex-wrap items-center gap-1 text-xs font-semibold leading-[1.4] text-muted-foreground">
<ol className="flex min-w-0 flex-nowrap items-center gap-1 overflow-hidden whitespace-nowrap text-xs font-semibold leading-[1.4] text-muted-foreground">
{items.map((item, index) => {
const isLast = index === items.length - 1

return (
<li className="flex min-w-0 items-center gap-1" key={item.href ?? item.label}>
<li
className={
isLast
? "flex min-w-0 items-center gap-1 overflow-hidden"
: "flex shrink-0 items-center gap-1"
}
key={item.href ?? item.label}
>
{index > 0 ? (
<Icons.chevronRight
aria-hidden="true"
className="size-3.5 shrink-0 translate-y-px opacity-60"
/>
) : null}
{isLast || item.href === undefined ? (
<span aria-current="page" className="truncate text-foreground">
<span aria-current="page" className="min-w-0 truncate text-foreground">
{item.label}
</span>
) : (
Expand Down