Skip to content

Commit 94de3f9

Browse files
committed
Try sync imports to avoid opennextjs/opennextjs-netlify#209
1 parent 5bdeed2 commit 94de3f9

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

pages/donate/receipts/[charge_id].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const getServerSideProps: GetServerSideProps<PageProps> = async (
4242
res.statusCode = 404;
4343
return { props: layoutProps };
4444
}
45-
const stripe = (await import("src/getStripe")).getStripe();
45+
const stripe = require("src/getStripe").getStripe();
4646
const charge = await stripe.charges.retrieve(charge_id);
4747
if (charge.status === "failed") {
4848
res.statusCode = 404;

pages/donate/result.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const getServerSideProps: GetServerSideProps<PageProps> = async (
3939
res.statusCode = 404;
4040
return { props: layoutProps };
4141
}
42-
const stripe = (await import("src/getStripe")).getStripe();
42+
const stripe = require("src/getStripe").getStripe();
4343
const session = await stripe.checkout.sessions.retrieve(session_id, {
4444
expand: ["payment_intent", "subscription.latest_invoice.charge"],
4545
});

pages/donate/subscriptions/[subscription_id].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const getServerSideProps: GetServerSideProps<PageProps> = async (
5252
res.statusCode = 404;
5353
return { props: layoutProps };
5454
}
55-
const stripe = (await import("src/getStripe")).getStripe();
55+
const stripe = require("src/getStripe").getStripe();
5656
const subscription = await stripe.subscriptions.retrieve(subscription_id, {
5757
expand: ["default_payment_method"],
5858
});

src/stripeBalanceTransactions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type DonationType = typeof DONATION_TYPES[number];
2121
export async function getBalanceTransactions(
2222
created?: number
2323
): Promise<BalanceTransactionBatch> {
24-
const stripe = (await import("src/getStripe")).getStripe();
24+
const stripe = require("src/getStripe").getStripe();
2525
const pollTime = dayjs().unix();
2626
created = created ?? dayjs(dayjs().format("YYYY-MM-01T00:00:00Z")).unix();
2727
const transactions: BalanceTransaction[] = [];

0 commit comments

Comments
 (0)