Replace some more uses of any
with more specific types (#389)
* Give confirmation button icon a type * Give setBids a type * Make StripeSession type more specific * Give MenuButton buttonContent a type
This commit is contained in:
parent
0f2a311b74
commit
397d90c6b7
|
@ -5,7 +5,13 @@ import Stripe from 'stripe'
|
||||||
import { getPrivateUser, getUser, isProd, payUser } from './utils'
|
import { getPrivateUser, getUser, isProd, payUser } from './utils'
|
||||||
import { sendThankYouEmail } from './emails'
|
import { sendThankYouEmail } from './emails'
|
||||||
|
|
||||||
export type StripeSession = Stripe.Event.Data.Object & { id: any, metadata: any}
|
export type StripeSession = Stripe.Event.Data.Object & {
|
||||||
|
id: string
|
||||||
|
metadata: {
|
||||||
|
userId: string
|
||||||
|
manticDollarQuantity: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export type StripeTransaction = {
|
export type StripeTransaction = {
|
||||||
userId: string
|
userId: string
|
||||||
|
|
|
@ -8,7 +8,7 @@ export function ConfirmationButton(props: {
|
||||||
id: string
|
id: string
|
||||||
openModalBtn: {
|
openModalBtn: {
|
||||||
label: string
|
label: string
|
||||||
icon?: any
|
icon?: JSX.Element
|
||||||
className?: string
|
className?: string
|
||||||
}
|
}
|
||||||
cancelBtn?: {
|
cancelBtn?: {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Menu, Transition } from '@headlessui/react'
|
||||||
import clsx from 'clsx'
|
import clsx from 'clsx'
|
||||||
|
|
||||||
export function MenuButton(props: {
|
export function MenuButton(props: {
|
||||||
buttonContent: any
|
buttonContent: JSX.Element
|
||||||
menuItems: { name: string; href: string; onClick?: () => void }[]
|
menuItems: { name: string; href: string; onClick?: () => void }[]
|
||||||
className?: string
|
className?: string
|
||||||
}) {
|
}) {
|
||||||
|
|
|
@ -110,11 +110,13 @@ function TableRowEnd(props: { entry: Entry | null; isNew?: boolean }) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Bid = { yesBid: number; noBid: number }
|
||||||
|
|
||||||
function NewBidTable(props: {
|
function NewBidTable(props: {
|
||||||
steps: number
|
steps: number
|
||||||
bids: Array<{ yesBid: number; noBid: number }>
|
bids: Array<Bid>
|
||||||
setSteps: (steps: number) => void
|
setSteps: (steps: number) => void
|
||||||
setBids: (bids: any[]) => void
|
setBids: (bids: Array<Bid>) => void
|
||||||
}) {
|
}) {
|
||||||
const { steps, bids, setSteps, setBids } = props
|
const { steps, bids, setSteps, setBids } = props
|
||||||
// Prepare for new bids
|
// Prepare for new bids
|
||||||
|
|
Loading…
Reference in New Issue
Block a user