gavaengine 2.4.0 → 2.4.1

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.
@@ -6,7 +6,6 @@ import {
6
6
  AuthProvider,
7
7
  useGavaAuth
8
8
  } from "../chunk-IU2SMMVV.js";
9
- import "../chunk-AOSHQP7D.js";
10
9
  export {
11
10
  AuthProvider,
12
11
  createNextAuthAdapter,
@@ -7,9 +7,6 @@ import {
7
7
  import {
8
8
  useGavaAuth
9
9
  } from "./chunk-IU2SMMVV.js";
10
- import {
11
- __require
12
- } from "./chunk-AOSHQP7D.js";
13
10
 
14
11
  // src/components/editor/ArticleEditor.tsx
15
12
  import { useState as useState6, useEffect as useEffect4, useCallback as useCallback4, useRef as useRef3 } from "react";
@@ -2993,17 +2990,10 @@ function CategoryManager({
2993
2990
  // src/components/dashboard/DashboardNavbar.tsx
2994
2991
  import Link4 from "next/link";
2995
2992
  import { usePathname } from "next/navigation";
2993
+ import { useSession, signOut } from "next-auth/react";
2996
2994
  import { FileText as FileText3, Users, LogOut, BarChart3, ImageIcon as ImageIcon3 } from "lucide-react";
2997
2995
  import { useState as useState15, useMemo } from "react";
2998
2996
  import { Fragment as Fragment7, jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
2999
- var useSessionFallback = null;
3000
- var signOutFallback = null;
3001
- try {
3002
- const mod = __require("next-auth/react");
3003
- useSessionFallback = mod.useSession;
3004
- signOutFallback = mod.signOut;
3005
- } catch {
3006
- }
3007
2997
  function useDefaultNavigation() {
3008
2998
  const config = useGavaConfig();
3009
2999
  return useMemo(
@@ -3046,14 +3036,14 @@ function DashboardNavbar({
3046
3036
  const { branding, roles, strings, routes } = config;
3047
3037
  const [mobileOpen, setMobileOpen] = useState15(false);
3048
3038
  const gavaAuth = useGavaAuth();
3049
- const nextAuthSession = useSessionFallback?.();
3050
- const session = gavaAuth.session ?? nextAuthSession?.data ?? null;
3039
+ const { data: nextAuthSession } = useSession();
3040
+ const session = gavaAuth.session ?? nextAuthSession ?? null;
3051
3041
  const role = session?.user?.role ?? "";
3052
3042
  const handleSignOut = () => {
3053
3043
  if (gavaAuth.signOut) {
3054
3044
  gavaAuth.signOut();
3055
- } else if (signOutFallback) {
3056
- signOutFallback({ callbackUrl: routes.login });
3045
+ } else {
3046
+ signOut({ callbackUrl: routes.login });
3057
3047
  }
3058
3048
  };
3059
3049
  const defaultNav = useMemo(() => buildDefaultNavigation(config), [config]);
@@ -3339,4 +3329,4 @@ export {
3339
3329
  SplashScreen,
3340
3330
  DashboardSplashTrigger
3341
3331
  };
3342
- //# sourceMappingURL=chunk-PZ5SO7QO.js.map
3332
+ //# sourceMappingURL=chunk-WPVUAMRJ.js.map