-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(plasma-new-hope): resolve circular dependency in Breadcrumb
- Loading branch information
1 parent
40612bf
commit b50b34d
Showing
3 changed files
with
6 additions
and
5 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...ges/plasma-new-hope/src/components/Breadcrumbs/ui/BreadcrumbShorter/BreadcrumbShorter.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/plasma-new-hope/src/components/Breadcrumbs/utils/addSeparator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import type { ReactNode } from 'react'; | ||
|
||
export const addSeparator = (items: ReactNode[], renderSeparator: ReactNode) => { | ||
return items.flatMap((item, idx) => (idx < items.length - 1 ? [item, renderSeparator] : [item])); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters