Skip to content

Commit 41ad6ef

Browse files
committed
fix: fix the build type errors, etc
1 parent 964ade3 commit 41ad6ef

File tree

7 files changed

+39
-21
lines changed

7 files changed

+39
-21
lines changed

apps/api/types/zeptomail.d.ts renamed to apps/api/src/types/zeptomail.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ declare module "zeptomail" {
1010
}): Promise<any>;
1111
}
1212
}
13-

apps/api/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// See also https://aka.ms/tsconfig/module
1010
"module": "nodenext",
1111
"target": "esnext",
12-
"types": [],
1312
// For nodejs:
1413
// "lib": ["esnext"],
1514
// "types": ["node"],

apps/web/src/components/checkout/checkout-confirmation.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ const CheckoutConfirmation: React.FC<CheckoutConfirmationProps> = ({
5252
</p>
5353

5454
<p className="text-lg lg:text-xl text-white/90 leading-relaxed font-light max-w-3xl mx-auto">
55-
Click on "Join" button below to join the Opensox premium community.
55+
Click on &quot;Join&quot; button below to join the Opensox premium
56+
community.
5657
</p>
5758

5859
<p className="text-lg lg:text-xl text-white/90 leading-relaxed font-light max-w-3xl mx-auto">

apps/web/src/components/payment/PaymentFlow.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,12 @@ const PaymentFlow: React.FC<PaymentFlowProps> = ({
6262
}
6363

6464
// Call backend verification endpoint
65-
66-
const result = await (utils.client.payment as any).verifyPayment.mutate(
67-
{
68-
razorpay_payment_id: response.razorpay_payment_id,
69-
razorpay_order_id: response.razorpay_order_id,
70-
razorpay_signature: response.razorpay_signature,
71-
planId: planId,
72-
}
73-
);
65+
await (utils.client.payment as any).verifyPayment.mutate({
66+
razorpay_payment_id: response.razorpay_payment_id,
67+
razorpay_order_id: response.razorpay_order_id,
68+
razorpay_signature: response.razorpay_signature,
69+
planId: planId,
70+
});
7471

7572
// Show success and redirect
7673
router.push("/checkout");

apps/web/src/providers/trpc-provider.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { useSession } from "next-auth/react";
77
import { trpc } from "@/lib/trpc";
88

99
export function TRPCProvider({ children }: { children: React.ReactNode }) {
10-
const { data: session, status } = useSession();
10+
const { data: session } = useSession();
1111
const [queryClient] = useState(
1212
() =>
1313
new QueryClient({
@@ -19,7 +19,7 @@ export function TRPCProvider({ children }: { children: React.ReactNode }) {
1919
})
2020
);
2121

22-
// Recreate client when session status changes to ensure we get the latest token
22+
// Recreate client when session changes to ensure we get the latest token
2323
const trpcClient = useMemo(() => {
2424
const baseUrl = process.env.NEXT_PUBLIC_API_URL || "http://localhost:4000";
2525
const trpcUrl = baseUrl.endsWith("/trpc") ? baseUrl : `${baseUrl}/trpc`;
@@ -40,7 +40,7 @@ export function TRPCProvider({ children }: { children: React.ReactNode }) {
4040
}),
4141
],
4242
});
43-
}, [status, session]);
43+
}, [session]);
4444

4545
return (
4646
<trpc.Provider client={trpcClient} queryClient={queryClient}>

apps/web/tsconfig.json

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"compilerOptions": {
33
"target": "ES2017",
4-
"lib": ["dom", "dom.iterable", "esnext"],
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
59
"allowJs": true,
610
"skipLibCheck": true,
711
"strict": true,
@@ -20,11 +24,23 @@
2024
],
2125
"baseUrl": ".",
2226
"paths": {
23-
"@/*": ["./src/*"],
24-
"@types/*": ["types/*"],
25-
"@opensox/shared/*": ["../../packages/shared/src/*"],
27+
"@/*": [
28+
"./src/*"
29+
],
30+
"@types/*": [
31+
"types/*"
32+
],
33+
"@opensox/shared/*": [
34+
"../../packages/shared/src/*"
35+
]
2636
}
2737
},
28-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
29-
"exclude": ["node_modules"]
38+
"include": [
39+
"next-env.d.ts",
40+
"**/*.ts",
41+
"**/*.tsx",
42+
".next/types/**/*.ts",
43+
"types/**/*"
44+
],
45+
"exclude": ["node_modules", "../api/node_modules"]
3046
}

apps/web/types/zeptomail.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
declare module "zeptomail" {
2+
export class SendMailClient {
3+
constructor(config: { url: string; token: string });
4+
sendMail(options: any): Promise<any>;
5+
}
6+
}

0 commit comments

Comments
 (0)