@djangocfg/layouts 2.1.618 → 2.1.619
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/layouts",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.619",
|
|
4
4
|
"description": "Simple, straightforward layout components for Next.js - import and use with props",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"layouts",
|
|
@@ -91,11 +91,11 @@
|
|
|
91
91
|
"test": "vitest run"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
|
-
"@djangocfg/analytics": "^2.1.
|
|
95
|
-
"@djangocfg/api": "^2.1.
|
|
96
|
-
"@djangocfg/devtools": "^2.1.
|
|
97
|
-
"@djangocfg/i18n": "^2.1.
|
|
98
|
-
"@djangocfg/ui-core": "^2.1.
|
|
94
|
+
"@djangocfg/analytics": "^2.1.619",
|
|
95
|
+
"@djangocfg/api": "^2.1.619",
|
|
96
|
+
"@djangocfg/devtools": "^2.1.619",
|
|
97
|
+
"@djangocfg/i18n": "^2.1.619",
|
|
98
|
+
"@djangocfg/ui-core": "^2.1.619",
|
|
99
99
|
"@hookform/resolvers": "^5.2.2 || ^7.0.2",
|
|
100
100
|
"consola": "^3.4.2",
|
|
101
101
|
"lucide-react": "^1.68.0",
|
|
@@ -123,12 +123,12 @@
|
|
|
123
123
|
"qrcode.react": "^4.2.0"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
|
-
"@djangocfg/analytics": "^2.1.
|
|
127
|
-
"@djangocfg/api": "^2.1.
|
|
128
|
-
"@djangocfg/devtools": "^2.1.
|
|
129
|
-
"@djangocfg/i18n": "^2.1.
|
|
130
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
131
|
-
"@djangocfg/ui-core": "^2.1.
|
|
126
|
+
"@djangocfg/analytics": "^2.1.619",
|
|
127
|
+
"@djangocfg/api": "^2.1.619",
|
|
128
|
+
"@djangocfg/devtools": "^2.1.619",
|
|
129
|
+
"@djangocfg/i18n": "^2.1.619",
|
|
130
|
+
"@djangocfg/typescript-config": "^2.1.619",
|
|
131
|
+
"@djangocfg/ui-core": "^2.1.619",
|
|
132
132
|
"@storybook/react-vite": "^10.6.5",
|
|
133
133
|
"@types/node": "^25.9.5",
|
|
134
134
|
"@types/react": "19.3.0",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import { useEffect, useState } from 'react';
|
|
10
10
|
import { useRouter } from 'next/navigation';
|
|
11
11
|
|
|
12
|
+
import { auth } from '@djangocfg/api';
|
|
12
13
|
import {
|
|
13
14
|
useAuth,
|
|
14
15
|
resolveGuardIsLoading,
|
|
@@ -92,7 +93,9 @@ export function useAuthGuard({
|
|
|
92
93
|
};
|
|
93
94
|
|
|
94
95
|
useEffect(() => {
|
|
95
|
-
|
|
96
|
+
// The React snapshot can still be the server's 'anonymous' while the store holds a live session (hydration, or a
|
|
97
|
+
// full-page load right after sign-in). Never redirect on that: the snapshot catches up and the effect re-runs.
|
|
98
|
+
if (shouldRedirectToAuth(guardState) && !auth.isAuthenticated()) {
|
|
96
99
|
const currentUrl = window.location.pathname + window.location.search;
|
|
97
100
|
saveRedirectUrl(currentUrl);
|
|
98
101
|
setIsRedirecting(true);
|