BranchLayout.utils.ts23 lines · main
| 1 | import type { ProductMenuGroup } from '@/components/ui/ProductMenu/ProductMenu.types' |
| 2 | |
| 3 | export const generateBranchMenu = (ref: string): ProductMenuGroup[] => { |
| 4 | return [ |
| 5 | { |
| 6 | title: 'Manage', |
| 7 | items: [ |
| 8 | { |
| 9 | name: 'Branches', |
| 10 | key: 'branches', |
| 11 | url: `/project/${ref}/branches`, |
| 12 | items: [], |
| 13 | }, |
| 14 | { |
| 15 | name: 'Merge requests', |
| 16 | key: 'merge-requests', |
| 17 | url: `/project/${ref}/branches/merge-requests`, |
| 18 | items: [], |
| 19 | }, |
| 20 | ], |
| 21 | }, |
| 22 | ] |
| 23 | } |