@djangocfg/api 2.1.468 → 2.1.469

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/api",
3
- "version": "2.1.468",
3
+ "version": "2.1.469",
4
4
  "description": "Auto-generated TypeScript API client with React hooks, SWR integration, and Zod validation for Django REST Framework backends",
5
5
  "keywords": [
6
6
  "django",
@@ -84,7 +84,7 @@
84
84
  "zod": "^4.3.6"
85
85
  },
86
86
  "devDependencies": {
87
- "@djangocfg/typescript-config": "^2.1.468",
87
+ "@djangocfg/typescript-config": "^2.1.469",
88
88
  "@testing-library/react": "^16.3.2",
89
89
  "@types/node": "^25.9.5",
90
90
  "@types/react": "19.2.15",
@@ -2,7 +2,6 @@
2
2
 
3
3
  import { useCallback, useState } from 'react';
4
4
 
5
- import { apiAccounts } from '../../clients';
6
5
  import { CfgAccountsProfile } from '../../_api/generated/sdk.gen';
7
6
  import { useAuth } from '../context';
8
7
  import { authLogger } from '../utils/logger';
@@ -34,11 +33,7 @@ export interface UseDeleteAccountReturn {
34
33
  * const { deleteAccount, isLoading, error } = useDeleteAccount();
35
34
  *
36
35
  * const handleDelete = async () => {
37
- * const result = await deleteAccount();
38
- * if (result.success) {
39
- * // Account deleted, perform logout
40
- * await logout();
41
- * }
36
+ * await deleteAccount(); // Signs out after a successful deletion.
42
37
  * };
43
38
  * ```
44
39
  */
@@ -69,7 +64,6 @@ export const useDeleteAccount = (): UseDeleteAccountReturn => {
69
64
  setError(response.message);
70
65
  throw new Error(response.message);
71
66
  }
72
-
73
67
  } catch (error) {
74
68
  authLogger.error('Failed to delete account:', error);
75
69
  throw error;
@@ -77,11 +71,9 @@ export const useDeleteAccount = (): UseDeleteAccountReturn => {
77
71
  setIsLoading(false);
78
72
  }
79
73
 
80
- // Return success response
81
-
82
74
  await logout();
83
75
  return { success: true, message: 'Account deleted successfully' };
84
- }, []);
76
+ }, [logout]);
85
77
 
86
78
  return {
87
79
  isLoading,