From 9ac231a0b4f4e9cbd8fffe1f9155962f5b212df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Wed, 19 Oct 2022 11:22:50 +0200 Subject: [PATCH] chore(examples): upgrade Stripe example (#41550) --- .../components/Cart.tsx | 2 +- .../components/CartSummary.tsx | 2 +- .../components/ClearCart.tsx | 2 +- .../components/Products.tsx | 2 +- examples/with-stripe-typescript/package.json | 27 ++++++++++--------- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/examples/with-stripe-typescript/components/Cart.tsx b/examples/with-stripe-typescript/components/Cart.tsx index 2aa5893d127b1..ca4d01a08d2cb 100644 --- a/examples/with-stripe-typescript/components/Cart.tsx +++ b/examples/with-stripe-typescript/components/Cart.tsx @@ -1,5 +1,5 @@ import React, { ReactNode } from 'react' -import { CartProvider } from 'use-shopping-cart/react' +import { CartProvider } from 'use-shopping-cart' import * as config from '../config' const Cart = ({ children }: { children: ReactNode }) => ( diff --git a/examples/with-stripe-typescript/components/CartSummary.tsx b/examples/with-stripe-typescript/components/CartSummary.tsx index e7055e8c0c4b2..a1262ae77b3f3 100644 --- a/examples/with-stripe-typescript/components/CartSummary.tsx +++ b/examples/with-stripe-typescript/components/CartSummary.tsx @@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react' import StripeTestCards from '../components/StripeTestCards' -import { useShoppingCart } from 'use-shopping-cart/react' +import { useShoppingCart } from 'use-shopping-cart' import { fetchPostJSON } from '../utils/api-helpers' const CartSummary = () => { diff --git a/examples/with-stripe-typescript/components/ClearCart.tsx b/examples/with-stripe-typescript/components/ClearCart.tsx index 49aaf8b7ae393..daf923cf35233 100644 --- a/examples/with-stripe-typescript/components/ClearCart.tsx +++ b/examples/with-stripe-typescript/components/ClearCart.tsx @@ -1,5 +1,5 @@ import { useEffect } from 'react' -import { useShoppingCart } from 'use-shopping-cart/react' +import { useShoppingCart } from 'use-shopping-cart' export default function ClearCart() { const { clearCart } = useShoppingCart() diff --git a/examples/with-stripe-typescript/components/Products.tsx b/examples/with-stripe-typescript/components/Products.tsx index db8560ecda48e..20763e6863efe 100644 --- a/examples/with-stripe-typescript/components/Products.tsx +++ b/examples/with-stripe-typescript/components/Products.tsx @@ -1,6 +1,6 @@ import products from '../data/products' import { formatCurrencyString } from 'use-shopping-cart' -import { useShoppingCart } from 'use-shopping-cart/react' +import { useShoppingCart } from 'use-shopping-cart' const Products = () => { const { addItem, removeItem } = useShoppingCart() diff --git a/examples/with-stripe-typescript/package.json b/examples/with-stripe-typescript/package.json index 38da16d8ff6f9..f1c9d7fd57fc4 100644 --- a/examples/with-stripe-typescript/package.json +++ b/examples/with-stripe-typescript/package.json @@ -6,22 +6,23 @@ "start": "next start" }, "dependencies": { - "@stripe/react-stripe-js": "1.7.0", - "@stripe/stripe-js": "1.22.0", - "micro": "^9.3.4", + "@stripe/react-stripe-js": "1.13.0", + "@stripe/stripe-js": "1.42.0", + "micro": "^9.4.1", "micro-cors": "^0.1.1", "next": "latest", - "react": "^17.0.2", - "react-dom": "^17.0.2", - "stripe": "8.200.0", - "swr": "^0.1.16", - "use-shopping-cart": "3.0.5" + "react": "^18.2.0", + "react-dom": "^18.2.0", + "stripe": "10.14.0", + "swr": "^1.3.0", + "use-shopping-cart": "3.1.2", + "redux": "4.2.0" }, "devDependencies": { - "@types/micro": "^7.3.3", - "@types/micro-cors": "^0.1.0", - "@types/node": "^13.1.2", - "@types/react": "^16.9.17", - "typescript": "4.5.5" + "@types/micro": "^7.3.7", + "@types/micro-cors": "^0.1.2", + "@types/node": "^18.11.2", + "@types/react": "^18.0.21", + "typescript": "4.8.4" } }