Skip to content

Commit

Permalink
clients/web: fix typing issue following client update
Browse files Browse the repository at this point in the history
  • Loading branch information
frankie567 committed Feb 19, 2025
1 parent bb7dad0 commit 6fb3260
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions clients/apps/web/src/components/Checkout/CheckoutLinkForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import ProductSelect from '../Products/ProductSelect'
import { toast } from '../Toast/use-toast'

type CheckoutLinkCreateForm = Omit<
schemas['CheckoutLinkCreate'],
schemas['CheckoutLinkCreateProducts'],
'payment_processor' | 'metadata'
> & {
metadata: { key: string; value: string | number | boolean }[]
Expand Down Expand Up @@ -155,7 +155,7 @@ export const CheckoutLinkForm = ({

const onSubmit: SubmitHandler<CheckoutLinkCreateForm> = useCallback(
async (data) => {
const body: schemas['CheckoutLinkCreate'] = {
const body: schemas['CheckoutLinkCreateProducts'] = {
payment_processor: 'stripe',
...data,
discount_id: data.discount_id || null,
Expand Down
2 changes: 1 addition & 1 deletion clients/apps/web/src/hooks/queries/checkout_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const useCheckoutLinks = (

export const useCreateCheckoutLink = () =>
useMutation({
mutationFn: (body: schemas['CheckoutLinkCreate']) => {
mutationFn: (body: schemas['CheckoutLinkCreateProducts']) => {
return api.POST('/v1/checkout-links/', { body })
},
onSuccess: (result, _variables, _ctx) => {
Expand Down

0 comments on commit 6fb3260

Please sign in to comment.