Update dependencies and refactor loading components

- Removed `react-is` and `require-in-the-middle` overrides from `package.json` and `pnpm-lock.yaml`.
- Updated various dependencies across multiple packages, including `@types/node` to `^24.5.2`, `react-hook-form` to `^7.63.0`, and `@ai-sdk/openai` to `^2.0.32`.
- Deleted the `loading.tsx` component from the admin accounts directory, streamlining the codebase.
- Adjusted `playwright.config.ts` to use a configurable number of workers for CI environments, enhancing test performance.
- Improved error handling in user ban and reactivation dialogs to provide clearer feedback to the admin user.
This commit is contained in:
gbuomprisco
2025-09-21 09:44:41 +08:00
parent 9712e2354b
commit f157cc7f3e
26 changed files with 1031 additions and 1390 deletions

View File

@@ -17,7 +17,7 @@
"@kit/eslint-config": "workspace:*",
"@kit/prettier-config": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@types/node": "^24.5.0"
"@types/node": "^24.5.2"
},
"typesVersions": {
"*": {

View File

@@ -32,7 +32,7 @@
"lucide-react": "^0.544.0",
"next": "15.5.3",
"react": "19.1.1",
"react-hook-form": "^7.62.0",
"react-hook-form": "^7.63.0",
"react-i18next": "^15.7.3",
"zod": "^3.25.74"
},

View File

@@ -20,7 +20,7 @@
"@kit/shared": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@kit/wordpress": "workspace:*",
"@types/node": "^24.5.0"
"@types/node": "^24.5.2"
},
"typesVersions": {
"*": {

View File

@@ -26,7 +26,7 @@
"@kit/prettier-config": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@kit/ui": "workspace:*",
"@types/node": "^24.5.0",
"@types/node": "^24.5.2",
"@types/react": "19.1.13",
"react": "19.1.1",
"zod": "^3.25.74"

View File

@@ -20,7 +20,7 @@
"@kit/prettier-config": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@kit/ui": "workspace:*",
"@types/node": "^24.5.0",
"@types/node": "^24.5.2",
"@types/react": "19.1.13",
"wp-types": "^4.68.1"
},

View File

@@ -43,7 +43,7 @@
"next-themes": "0.4.6",
"react": "19.1.1",
"react-dom": "19.1.1",
"react-hook-form": "^7.62.0",
"react-hook-form": "^7.63.0",
"react-i18next": "^15.7.3",
"zod": "^3.25.74"
},

View File

@@ -28,7 +28,7 @@
"next": "15.5.3",
"react": "19.1.1",
"react-dom": "19.1.1",
"react-hook-form": "^7.62.0",
"react-hook-form": "^7.63.0",
"zod": "^3.25.74"
},
"exports": {

View File

@@ -2,8 +2,6 @@
import { useState, useTransition } from 'react';
import { isRedirectError } from 'next/dist/client/components/redirect-error';
import { zodResolver } from '@hookform/resolvers/zod';
import { useForm } from 'react-hook-form';
@@ -80,8 +78,8 @@ function BanUserForm(props: { userId: string }) {
startTransition(async () => {
try {
await banUserAction(data);
} catch (error) {
setError(!isRedirectError(error));
} catch {
setError(true);
}
});
})}

View File

@@ -2,8 +2,6 @@
import { useState, useTransition } from 'react';
import { isRedirectError } from 'next/dist/client/components/redirect-error';
import { zodResolver } from '@hookform/resolvers/zod';
import { useForm } from 'react-hook-form';
@@ -79,8 +77,8 @@ function ReactivateUserForm(props: { userId: string }) {
startTransition(async () => {
try {
await reactivateUserAction(data);
} catch (error) {
setError(!isRedirectError(error));
} catch {
setError(true);
}
});
})}

View File

@@ -43,11 +43,9 @@ export const banUserAction = adminAction(
};
}
logger.info({ userId }, `Super Admin has successfully banned user`);
revalidateAdmin();
return redirect(`/admin/accounts/${userId}`);
logger.info({ userId }, `Super Admin has successfully banned user`);
},
{
schema: BanUserSchema,
@@ -80,8 +78,6 @@ export const reactivateUserAction = adminAction(
revalidateAdmin();
logger.info({ userId }, `Super Admin has successfully reactivated user`);
return redirect(`/admin/accounts/${userId}`);
},
{
schema: ReactivateUserSchema,

View File

@@ -34,7 +34,7 @@
"@types/react": "19.1.13",
"lucide-react": "^0.544.0",
"next": "15.5.3",
"react-hook-form": "^7.62.0",
"react-hook-form": "^7.63.0",
"react-i18next": "^15.7.3",
"sonner": "^2.0.7",
"zod": "^3.25.74"

View File

@@ -43,7 +43,7 @@
"next": "15.5.3",
"react": "19.1.1",
"react-dom": "19.1.1",
"react-hook-form": "^7.62.0",
"react-hook-form": "^7.63.0",
"react-i18next": "^15.7.3",
"zod": "^3.25.74"
},

View File

@@ -20,7 +20,7 @@
"@kit/resend": "workspace:*",
"@kit/shared": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@types/node": "^24.5.0",
"@types/node": "^24.5.2",
"zod": "^3.25.74"
},
"typesVersions": {

View File

@@ -17,7 +17,7 @@
"@kit/mailers-shared": "workspace:*",
"@kit/prettier-config": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@types/node": "^24.5.0",
"@types/node": "^24.5.2",
"zod": "^3.25.74"
},
"typesVersions": {

View File

@@ -25,8 +25,8 @@
"@kit/eslint-config": "workspace:*",
"@kit/prettier-config": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@modelcontextprotocol/sdk": "1.18.0",
"@types/node": "^24.5.0",
"@modelcontextprotocol/sdk": "1.18.1",
"@types/node": "^24.5.2",
"postgres": "3.4.7",
"zod": "^3.25.74"
},

View File

@@ -16,7 +16,7 @@
"./config/server": "./src/sentry.client.server.ts"
},
"dependencies": {
"@sentry/nextjs": "^10.11.0",
"@sentry/nextjs": "^10.12.0",
"import-in-the-middle": "1.14.2"
},
"devDependencies": {

View File

@@ -30,7 +30,7 @@
"@types/react-dom": "19.1.9",
"react": "19.1.1",
"react-dom": "19.1.1",
"react-hook-form": "^7.62.0",
"react-hook-form": "^7.63.0",
"zod": "^3.25.74"
},
"typesVersions": {

View File

@@ -23,7 +23,7 @@
"@types/react": "19.1.13"
},
"dependencies": {
"pino": "^9.9.5"
"pino": "^9.11.0"
},
"typesVersions": {
"*": {

View File

@@ -36,8 +36,8 @@
"next": "15.5.3",
"next-themes": "0.4.6",
"prettier": "^3.6.2",
"react-day-picker": "^9.10.0",
"react-hook-form": "^7.62.0",
"react-day-picker": "^9.11.0",
"react-hook-form": "^7.63.0",
"react-i18next": "^15.7.3",
"sonner": "^2.0.7",
"tailwindcss": "4.1.13",