Skip to content

Commit

Permalink
fix with-typescript-example redirectToCheckout fn fixes vercel#50541
Browse files Browse the repository at this point in the history
  • Loading branch information
ciruz committed May 31, 2023
1 parent 1619a6a commit 12bad1a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions examples/with-stripe-typescript/components/CartSummary.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React, { useState, useEffect } from 'react'
import React, { useEffect, useState } from 'react'

import StripeTestCards from '../components/StripeTestCards'

import { useShoppingCart } from 'use-shopping-cart'
import { fetchPostJSON } from '../utils/api-helpers'
import { useShoppingCart } from 'use-shopping-cart'

const CartSummary = () => {
const [loading, setLoading] = useState(false)
Expand Down Expand Up @@ -38,7 +37,7 @@ const CartSummary = () => {
return
}

redirectToCheckout({ sessionId: response.id })
redirectToCheckout(response.id)
}

return (
Expand Down

0 comments on commit 12bad1a

Please sign in to comment.