diff --git a/web/components/add-funds-button.tsx b/web/components/add-funds-button.tsx index 04459af0..9958ee4e 100644 --- a/web/components/add-funds-button.tsx +++ b/web/components/add-funds-button.tsx @@ -2,6 +2,7 @@ import clsx from 'clsx' import { useState } from 'react' import { useUser } from '../hooks/use-user' +import { checkoutURL } from '../lib/service/stripe' import { FundsSelector } from './yes-no-selector' export function AddFundsButton() { @@ -41,7 +42,10 @@ export function AddFundsButton() { Back -
+ @@ -52,9 +56,3 @@ export function AddFundsButton() { ) } - -const checkoutURL = (userId: string, manticDollarQuantity: number) => { - const endpoint = - 'https://us-central1-mantic-markets.cloudfunctions.net/createCheckoutSession' - return `${endpoint}?userId=${userId}&manticDollarQuantity=${manticDollarQuantity}` -} diff --git a/web/components/header.tsx b/web/components/header.tsx index b723ebb7..a0bd65e1 100644 --- a/web/components/header.tsx +++ b/web/components/header.tsx @@ -35,6 +35,10 @@ function getNavigationOptions(user: User, options: { mobile: boolean }) { name: 'Your markets', href: `/${user.username}`, }, + { + name: 'Add funds', + href: '/add-funds', + }, ] } diff --git a/web/components/yes-no-selector.tsx b/web/components/yes-no-selector.tsx index 43524efa..788466b3 100644 --- a/web/components/yes-no-selector.tsx +++ b/web/components/yes-no-selector.tsx @@ -83,7 +83,7 @@ export function FundsSelector(props: { {fundAmounts.map((amount) => (