2.23.11 (#448)
* chore: bump version to 2.23.10 and enhance workspace loading logic - Updated application version from 2.23.9 to 2.23.10 in package.json. - Refactored workspace loading functions to use async/await for improved error handling and added redirects for missing workspaces or users. - Updated sidebar layout components to handle asynchronous data fetching and redirection more effectively. - Minor adjustments to personal account dropdown styles for consistency. * refactor: remove unused import from load-user-workspace.ts - Removed the unused 'forbidden' import from the load-user-workspace.ts file to clean up the code and improve readability. * refactor: remove debug log from workspaceLoader function - Removed the console.log statement for workspace and user in the load-user-workspace.ts file to clean up the code and improve performance. * chore: bump version to 2.23.11 and update dependencies - Updated application version from 2.23.10 to 2.23.11 in package.json. - Upgraded prettier to version 3.8.1. - Updated various dependencies including @next/bundle-analyzer to 16.1.4, @next/eslint-plugin-next to 16.1.4, @react-email/components to 1.0.6, @stripe/stripe-js to 8.6.4, and @supabase/supabase-js to 2.91.1. - Improved type support by upgrading @types/node to 25.0.10 and @types/react to 19.2.9. - Enhanced i18next to version 25.8.0 for better localization support. * chore: update dependencies and improve package configurations - Bumped versions of several packages including @turbo/gen and turbo to 2.7.6, @next/bundle-analyzer and @next/eslint-plugin-next to 16.1.5, and @stripe/react-stripe-js to 5.5.0. - Updated @supabase/supabase-js to 2.93.1 and added @sentry/nextjs to the workspace. - Changed nodemailer and related types to use catalog references for better dependency management. - Refactored global styles to include tw-animate-css and removed the old tailwindcss-animate plugin. - Enhanced type definitions for eslint and related packages. * chore: update pnpm-lock.yaml with new dependencies and version adjustments - Added new dependencies: @sentry/nextjs (10.37.0), @types/eslint (9.6.1), @types/nodemailer (7.0.9), eslint (9.39.2), and eslint-config-turbo (2.7.6). - Updated nodemailer to version 7.0.12 and adjusted its specifier to use catalog references. - Changed the specifier for several packages to 'catalog:' for improved dependency management. - Removed outdated references to eslint-community/eslint-utils version 4.9.0. * feat: enhance user dialog components with success callbacks - Added state management for open/close functionality in AdminBanUserDialog and AdminReactivateUserDialog. - Updated BanUserForm and ReactivateUserForm to accept an onSuccess prop, allowing the dialog to close upon successful user action.
This commit is contained in:
committed by
GitHub
parent
255ba19766
commit
9355c0a614
@@ -37,8 +37,10 @@ export function AdminBanUserDialog(
|
||||
userId: string;
|
||||
}>,
|
||||
) {
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
return (
|
||||
<AlertDialog>
|
||||
<AlertDialog open={open} onOpenChange={setOpen}>
|
||||
<AlertDialogTrigger asChild>{props.children}</AlertDialogTrigger>
|
||||
|
||||
<AlertDialogContent>
|
||||
@@ -51,13 +53,13 @@ export function AdminBanUserDialog(
|
||||
</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
|
||||
<BanUserForm userId={props.userId} />
|
||||
<BanUserForm userId={props.userId} onSuccess={() => setOpen(false)} />
|
||||
</AlertDialogContent>
|
||||
</AlertDialog>
|
||||
);
|
||||
}
|
||||
|
||||
function BanUserForm(props: { userId: string }) {
|
||||
function BanUserForm(props: { userId: string; onSuccess: () => void }) {
|
||||
const [pending, startTransition] = useTransition();
|
||||
const [error, setError] = useState<boolean>(false);
|
||||
|
||||
@@ -78,6 +80,7 @@ function BanUserForm(props: { userId: string }) {
|
||||
startTransition(async () => {
|
||||
try {
|
||||
await banUserAction(data);
|
||||
props.onSuccess();
|
||||
} catch {
|
||||
setError(true);
|
||||
}
|
||||
|
||||
@@ -37,8 +37,10 @@ export function AdminReactivateUserDialog(
|
||||
userId: string;
|
||||
}>,
|
||||
) {
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
return (
|
||||
<AlertDialog>
|
||||
<AlertDialog open={open} onOpenChange={setOpen}>
|
||||
<AlertDialogTrigger asChild>{props.children}</AlertDialogTrigger>
|
||||
|
||||
<AlertDialogContent>
|
||||
@@ -50,13 +52,13 @@ export function AdminReactivateUserDialog(
|
||||
</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
|
||||
<ReactivateUserForm userId={props.userId} />
|
||||
<ReactivateUserForm userId={props.userId} onSuccess={() => setOpen(false)} />
|
||||
</AlertDialogContent>
|
||||
</AlertDialog>
|
||||
);
|
||||
}
|
||||
|
||||
function ReactivateUserForm(props: { userId: string }) {
|
||||
function ReactivateUserForm(props: { userId: string; onSuccess: () => void }) {
|
||||
const [pending, startTransition] = useTransition();
|
||||
const [error, setError] = useState<boolean>(false);
|
||||
|
||||
@@ -77,6 +79,7 @@ function ReactivateUserForm(props: { userId: string }) {
|
||||
startTransition(async () => {
|
||||
try {
|
||||
await reactivateUserAction(data);
|
||||
props.onSuccess();
|
||||
} catch {
|
||||
setError(true);
|
||||
}
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"nodemailer": "^7.0.12"
|
||||
"nodemailer": "catalog:"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kit/eslint-config": "workspace:*",
|
||||
"@kit/mailers-shared": "workspace:*",
|
||||
"@kit/prettier-config": "workspace:*",
|
||||
"@kit/tsconfig": "workspace:*",
|
||||
"@types/nodemailer": "7.0.5",
|
||||
"@types/nodemailer": "catalog:",
|
||||
"zod": "catalog:"
|
||||
},
|
||||
"typesVersions": {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"devDependencies": {
|
||||
"@kit/prettier-config": "workspace:*",
|
||||
"@kit/tsconfig": "workspace:*",
|
||||
"@modelcontextprotocol/sdk": "1.25.2",
|
||||
"@modelcontextprotocol/sdk": "1.25.3",
|
||||
"@types/node": "catalog:",
|
||||
"postgres": "3.4.8",
|
||||
"zod": "catalog:"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"./config/server": "./src/sentry.client.server.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sentry/nextjs": "^10.34.0"
|
||||
"@sentry/nextjs": "catalog:"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kit/eslint-config": "workspace:*",
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"@types/react": "catalog:"
|
||||
},
|
||||
"dependencies": {
|
||||
"pino": "^10.2.0"
|
||||
"pino": "^10.3.0"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"eslint": "^9.39.2",
|
||||
"next": "catalog:",
|
||||
"next-themes": "0.4.6",
|
||||
"prettier": "^3.8.0",
|
||||
"prettier": "^3.8.1",
|
||||
"react-day-picker": "^9.13.0",
|
||||
"react-hook-form": "catalog:",
|
||||
"react-i18next": "catalog:",
|
||||
|
||||
Reference in New Issue
Block a user