HelpPanel.utils.ts12 lines · main
| 1 | import { SupportFormUrlKeys } from '@/components/interfaces/Support/SupportForm.utils' |
| 2 | |
| 3 | export function getSupportLinkQueryParams( |
| 4 | project: { parent_project_ref?: string } | undefined, |
| 5 | org: { slug?: string } | undefined, |
| 6 | routerRef: string | undefined |
| 7 | ): Partial<SupportFormUrlKeys> | undefined { |
| 8 | const projectRef = project?.parent_project_ref ?? routerRef |
| 9 | if (projectRef) return { projectRef } |
| 10 | if (org?.slug) return { orgSlug: org.slug } |
| 11 | return undefined |
| 12 | } |