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 { 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 = {
|
||||
userId: string
|
||||
|
|
|
@ -8,7 +8,7 @@ export function ConfirmationButton(props: {
|
|||
id: string
|
||||
openModalBtn: {
|
||||
label: string
|
||||
icon?: any
|
||||
icon?: JSX.Element
|
||||
className?: string
|
||||
}
|
||||
cancelBtn?: {
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Menu, Transition } from '@headlessui/react'
|
|||
import clsx from 'clsx'
|
||||
|
||||
export function MenuButton(props: {
|
||||
buttonContent: any
|
||||
buttonContent: JSX.Element
|
||||
menuItems: { name: string; href: string; onClick?: () => void }[]
|
||||
className?: string
|
||||
}) {
|
||||
|
|
|
@ -110,11 +110,13 @@ function TableRowEnd(props: { entry: Entry | null; isNew?: boolean }) {
|
|||
}
|
||||
}
|
||||
|
||||
type Bid = { yesBid: number; noBid: number }
|
||||
|
||||
function NewBidTable(props: {
|
||||
steps: number
|
||||
bids: Array<{ yesBid: number; noBid: number }>
|
||||
bids: Array<Bid>
|
||||
setSteps: (steps: number) => void
|
||||
setBids: (bids: any[]) => void
|
||||
setBids: (bids: Array<Bid>) => void
|
||||
}) {
|
||||
const { steps, bids, setSteps, setBids } = props
|
||||
// Prepare for new bids
|
||||
|
|
Loading…
Reference in New Issue
Block a user