Skip to content

Instantly share code, notes, and snippets.

@simon-saliba
Created June 17, 2021 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simon-saliba/bdbfa651f3f63863eaf36d7d6a4366af to your computer and use it in GitHub Desktop.
Save simon-saliba/bdbfa651f3f63863eaf36d7d6a4366af to your computer and use it in GitHub Desktop.
App root file
import React from "react";
import { Elements } from "@stripe/react-stripe-js";
import { loadStripe } from "@stripe/stripe-js";
import CheckoutForm from "./components/CheckoutForm/CheckoutForm";
const stripePromise = loadStripe(
"pk_test_51IyLknBE4nCaoI6V9xgxz1wcOou9Yx0NItfAkpgGffI3AALNVAZhl8Dp4fGtQs1XsASywXRiIapdjQyofsPsqyOy00uEgR8vBV"
);
const App = () => {
return (
<Elements stripe={stripePromise}>
<CheckoutForm />
</Elements>
);
};
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment