sixseconds-modules 1.6.38 → 1.6.41

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.
@@ -7,3 +7,4 @@ export declare const env: Readonly<{
7
7
  VITE_MODULES_CERT_FRONTEND_BASE_URL: string;
8
8
  VITE_MODULES_SSO_BACKEND_BASE_URL: string;
9
9
  }>;
10
+ export declare const DEV: boolean;
package/dist/index.cjs.js CHANGED
@@ -2663,6 +2663,7 @@ const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "devel
2663
2663
  const env = createEnv({
2664
2664
  runtimeEnv: __vite_import_meta_env__
2665
2665
  });
2666
+ const DEV = process.env.NODE_ENV === "development";
2666
2667
  const SERVER_STATUS = Object.freeze({
2667
2668
  success: "success",
2668
2669
  failure: "failure"
@@ -2833,10 +2834,13 @@ const handleRedirection = (type, source) => {
2833
2834
  }
2834
2835
  };
2835
2836
  const CookiesUtil = {
2837
+ get: (name) => {
2838
+ return JSON.parse(Cookies.get(name) || "{}");
2839
+ },
2836
2840
  set: (name, val) => {
2837
2841
  Cookies.set(name, JSON.stringify(val), {
2838
2842
  path: "/",
2839
- domain: ".6seconds.org",
2843
+ domain: DEV ? "localhost" : ".6seconds.org",
2840
2844
  secure: true,
2841
2845
  sameSite: "None",
2842
2846
  expires: 7
@@ -10766,7 +10770,7 @@ const IMAGES = {
10766
10770
  Us
10767
10771
  };
10768
10772
  const PreviousLoginBanner = ({ t: t2, router }) => {
10769
- const previousLoginDetails = Cookies.get("previousLoginDetails") || {};
10773
+ const previousLoginDetails = CookiesUtil.get("previousLoginDetails") || {};
10770
10774
  CookiesUtil.set("previousLoginDetails", previousLoginDetails);
10771
10775
  const handleAutoLogin = async () => {
10772
10776
  try {