@pelatform/starter.shared 0.2.14 → 0.2.15
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/dist/index.js +3 -2
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -514,7 +514,7 @@ function UserMenu({
|
|
|
514
514
|
homeUrl,
|
|
515
515
|
hiddenSwitcher = false
|
|
516
516
|
}) {
|
|
517
|
-
const { features, path } = useConfig4();
|
|
517
|
+
const { auth, features, path } = useConfig4();
|
|
518
518
|
const router = useRouter2();
|
|
519
519
|
const t = useTranslations7();
|
|
520
520
|
const { isPending: sessionPending, user } = useSession3();
|
|
@@ -534,13 +534,14 @@ function UserMenu({
|
|
|
534
534
|
try {
|
|
535
535
|
await setActiveSessionAsync({ sessionToken });
|
|
536
536
|
router.refresh();
|
|
537
|
+
router.push(auth.redirectAfterSignIn || "/");
|
|
537
538
|
setActiveSessionPending(false);
|
|
538
539
|
} catch (error) {
|
|
539
540
|
console.error("Error switching account:", error);
|
|
540
541
|
setActiveSessionPending(false);
|
|
541
542
|
}
|
|
542
543
|
},
|
|
543
|
-
[router, setActiveSessionAsync]
|
|
544
|
+
[router, setActiveSessionAsync, auth.redirectAfterSignIn]
|
|
544
545
|
);
|
|
545
546
|
useEffect(() => {
|
|
546
547
|
if (!features.multiSession) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pelatform/starter.shared",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.15",
|
|
4
4
|
"description": "A part of SaaS starter kit for Pelatform applications.",
|
|
5
5
|
"author": "Pelatform",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@pelatform/starter.config": "0.2.2",
|
|
39
39
|
"@pelatform/starter.hook": "0.2.4",
|
|
40
|
-
"@pelatform/starter.utils": "0.2.
|
|
40
|
+
"@pelatform/starter.utils": "0.2.10",
|
|
41
41
|
"@pelatform/tsconfig": "^0.1.4",
|
|
42
|
-
"@types/react": "^19.2.
|
|
43
|
-
"lucide-react": "^0.
|
|
44
|
-
"next": "^16.1.
|
|
42
|
+
"@types/react": "^19.2.9",
|
|
43
|
+
"lucide-react": "^0.563.0",
|
|
44
|
+
"next": "^16.1.4",
|
|
45
45
|
"next-intl": "^4.7.0",
|
|
46
|
-
"pelatform-ui": "^1.1.
|
|
46
|
+
"pelatform-ui": "^1.1.19",
|
|
47
47
|
"react": "^19.2.3",
|
|
48
48
|
"tsup": "^8.5.1"
|
|
49
49
|
},
|