File tree Expand file tree Collapse file tree
src/Shared/Components/DocLink Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,3 +25,8 @@ export type DocLinkProps<T extends boolean = false> = Pick<
2525 */
2626 openInNewTab ?: boolean
2727 }
28+
29+ export interface URLWithUTMSource {
30+ isEnterprise : BaseDocLink < false > [ 'isEnterprise' ]
31+ link ?: string
32+ }
Original file line number Diff line number Diff line change 11import { DOCUMENTATION_HOME_PAGE , DOCUMENTATION_VERSION } from '@Common/Constants'
22
33import { DOCUMENTATION } from './constants'
4- import { BaseDocLink } from './types'
4+ import { BaseDocLink , URLWithUTMSource } from './types'
55
6- export const getUTMPathAppended = ( { isEnterprise, link } : { isEnterprise : boolean ; link ?: string } ) =>
6+ export const getUTMPathAppended = ( { isEnterprise, link = '' } : URLWithUTMSource ) =>
77 `${ link } ?utm_source=product_${ isEnterprise ? 'ent' : 'oss' } &utm_medium=product_app&utm_campaign=docs_navigation`
88
99export const getDocumentationUrl = < T extends boolean = false > ( {
You can’t perform that action at this time.
0 commit comments