acc9c84e2e
* Configure functions module to allow absolute imports * Convert common imports in functions to be absolute * Convert common imports in web to be absolute * Convert lib imports in web to be absolute * Convert hooks imports in web to be absolute * Convert components imports in web to be absolute
14 lines
384 B
TypeScript
14 lines
384 B
TypeScript
import { PROJECT_ID } from 'common/envs/constants'
|
|
|
|
export const checkoutURL = (
|
|
userId: string,
|
|
manticDollarQuantity: number,
|
|
referer = ''
|
|
) => {
|
|
const endpoint = `https://us-central1-${PROJECT_ID}.cloudfunctions.net/createCheckoutSession`
|
|
|
|
return `${endpoint}?userId=${userId}&manticDollarQuantity=${manticDollarQuantity}&referer=${encodeURIComponent(
|
|
referer
|
|
)}`
|
|
}
|