(slug: string)
| 37 | const active = projects.find((p) => p.slug === activeSlug) ?? null; |
| 38 | |
| 39 | function pick(slug: string) { |
| 40 | if (slug === activeSlug) return; |
| 41 | const subPath = subPathFromPathname(pathname, activeSlug); |
| 42 | start(async () => { |
| 43 | const result = await switchProjectAction(slug); |
| 44 | if (!result.ok) { |
| 45 | toast.error(result.error); |
| 46 | return; |
| 47 | } |
| 48 | router.push(projectHref(slug, subPath)); |
| 49 | }); |
| 50 | } |
| 51 | |
| 52 | return ( |
| 53 | <DropdownMenu> |
no test coverage detected