Skip to content

Commit

Permalink
Revert "stripe attempt #2: add missing await before loadStripe() call"
Browse files Browse the repository at this point in the history
This reverts commit 8c82938.
  • Loading branch information
Ratchet7x5 committed Dec 12, 2024
1 parent 4cc246e commit eb1cca7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion web/Dockerfile.auis
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ ENV VITE_API_URL="https://auis-api.fly.dev"
ENV VITE_STRAPI_URL="https://auis-strapi.fly.dev"
ENV VITE_APP_URL="https://auis.fly.dev"
ENV VITE_APP_NAME="AUIS"
ENV VITE_STRIPE_PUBLISHABLE_KEY="pk_test_51PPclyP464csY2UpQPZ4cpWlyupAwPXfvWZRIG0zy9BhlYE8GmR4LYEytjFKOjMS6o5oXF5I0QMB8RWcc0TqsNxC00Nz3UAH14"

# Mount secrets into Dockerfile and set environment variables
RUN yarn run build
Expand Down
3 changes: 1 addition & 2 deletions web/src/screens/CheckoutScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ const STRIPE_PUBLISHABLE_KEY = import.meta.env.VITE_STRIPE_PUBLISHABLE_KEY;

// Make sure to call `loadStripe` outside of a component’s render to avoid
// recreating the `Stripe` object on every render.
const stripePromise = await loadStripe(`${STRIPE_PUBLISHABLE_KEY}`);
const stripePromise = loadStripe(`${STRIPE_PUBLISHABLE_KEY}`);
let bodyData: { priceId: string; userTicketId: number };

export default function CheckoutScreen() {
const location = useLocation();
// ensure data required for checkout is here
Expand Down

0 comments on commit eb1cca7

Please sign in to comment.