Skip to content

Commit a7f995e

Browse files
committed
fix types for real
1 parent 4f9366b commit a7f995e

File tree

6 files changed

+48
-27
lines changed

6 files changed

+48
-27
lines changed

bun.lock

Lines changed: 25 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

freebuff/web/package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,20 @@
2525
"next-auth": "^4.24.11",
2626
"next-themes": "^0.3.0",
2727
"pino": "^9.6.0",
28-
"react": "^19.0.0",
29-
"react-dom": "^19.0.0",
28+
"react": "18.3.1",
29+
"react-dom": "18.3.1",
3030
"tailwind-merge": "^2.5.2",
3131
"zod": "^4.2.1"
3232
},
33+
"overrides": {
34+
"@types/react": "$@types/react",
35+
"@types/react-dom": "$@types/react-dom"
36+
},
3337
"devDependencies": {
3438
"@tailwindcss/typography": "^0.5.15",
3539
"@types/node": "^22.14.0",
36-
"@types/react": "^19.0.0",
37-
"@types/react-dom": "^19.0.0",
40+
"@types/react": "18.3.26",
41+
"@types/react-dom": "18.3.7",
3842
"autoprefixer": "^10.4.21",
3943
"postcss": "^8",
4044
"tailwindcss": "^3.4.11",

packages/billing/tsconfig.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"target": "ES2022",
5-
"types": ["bun", "node"]
5+
"types": ["bun", "node"],
6+
"baseUrl": ".",
7+
"paths": {
8+
"drizzle-orm": ["../internal/node_modules/drizzle-orm"],
9+
"drizzle-orm/*": ["../internal/node_modules/drizzle-orm/*"]
10+
}
611
},
712
"include": ["src/**/*.ts"],
813
"exclude": ["node_modules"]

scripts/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"baseUrl": "..",
66
"paths": {
77
"@codebuff/sdk": ["./sdk/src/index.ts"],
8-
"@codebuff/sdk/*": ["./sdk/src/*"]
8+
"@codebuff/sdk/*": ["./sdk/src/*"],
9+
"drizzle-orm": ["./packages/internal/node_modules/drizzle-orm"],
10+
"drizzle-orm/*": ["./packages/internal/node_modules/drizzle-orm/*"]
911
}
1012
},
1113
"include": ["**/*.ts"],

web/src/app/affiliates/affiliates-client.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
import Link from 'next/link'
99
import { useSession } from 'next-auth/react'
1010
import React, { useEffect, useState, useCallback, useActionState } from 'react'
11-
import { useFormStatus } from 'react-dom'
1211

1312
import { setAffiliateHandleAction } from './actions'
1413

@@ -29,8 +28,7 @@ import { Label } from '@/components/ui/label'
2928
import { Skeleton } from '@/components/ui/skeleton'
3029
import { useToast } from '@/components/ui/use-toast'
3130

32-
function SubmitButton() {
33-
const { pending } = useFormStatus()
31+
function SubmitButton({ pending }: { pending: boolean }) {
3432
return (
3533
<Button type="submit" disabled={pending} aria-disabled={pending}>
3634
{pending ? 'Setting Handle...' : 'Set Handle'}
@@ -49,7 +47,7 @@ function SetHandleForm({
4947
success: false,
5048
fieldErrors: {},
5149
}
52-
const [state, formAction] = useActionState(
50+
const [state, formAction, isPending] = useActionState(
5351
setAffiliateHandleAction,
5452
initialState,
5553
)
@@ -100,7 +98,7 @@ function SetHandleForm({
10098
<p className="text-sm text-red-600 mt-1">{state.message}</p>
10199
)}
102100
</div>
103-
<SubmitButton />
101+
<SubmitButton pending={isPending} />
104102
</form>
105103
)
106104
}

web/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
"paths": {
2525
"@/*": ["./src/*"],
2626
"@codebuff/sdk": ["../sdk/src/index.ts"],
27-
"@codebuff/sdk/*": ["../sdk/src/*"]
27+
"@codebuff/sdk/*": ["../sdk/src/*"],
28+
"drizzle-orm": ["../packages/internal/node_modules/drizzle-orm"],
29+
"drizzle-orm/*": ["../packages/internal/node_modules/drizzle-orm/*"]
2830
}
2931
},
3032
"include": [

0 commit comments

Comments
 (0)