sixseconds-modules 1.1.3 → 1.1.4

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.es.js CHANGED
@@ -2,9 +2,8 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { styled, Stack, Box, Typography, Avatar, Button, MenuItem } from "@mui/material";
3
3
  import { useState, useEffect, useRef } from "react";
4
4
  import axios from "axios";
5
- import { useSelector, useDispatch } from "react-redux";
6
- import { createSlice } from "@reduxjs/toolkit";
7
5
  import CheckIcon from "@mui/icons-material/Check";
6
+ import { useSelector } from "react-redux";
8
7
  const HeaderStyled = styled("div")(() => ({
9
8
  "& .SubHeader ": {
10
9
  background: "#fff",
@@ -197,27 +196,6 @@ async function getUserDetails() {
197
196
  });
198
197
  return response;
199
198
  }
200
- const transformUser = (userData) => {
201
- const data = userData?.data?.data;
202
- const { user, additional_data } = data;
203
- return {
204
- name: user?.Name,
205
- email: user?.Email,
206
- user_profile: additional_data?.user_profile
207
- };
208
- };
209
- const initialState$1 = {};
210
- const UserProfileSlice = createSlice({
211
- name: "UserProfile",
212
- initialState: initialState$1,
213
- reducers: {
214
- setUserProfile: (_, action) => {
215
- return action.payload;
216
- }
217
- }
218
- });
219
- const { setUserProfile } = UserProfileSlice.actions;
220
- UserProfileSlice.reducer;
221
199
  const NotificationModal = () => {
222
200
  const notifications = [
223
201
  {
@@ -529,38 +507,20 @@ const useClickModals = (ref, callback) => {
529
507
  };
530
508
  }, [ref, callback]);
531
509
  };
532
- const initialState = {
533
- isSSoFlag: false
534
- };
535
- const SsoAppSlice = createSlice({
536
- name: "SSO_App",
537
- initialState,
538
- reducers: {
539
- setIsSSOFlag: (state, action) => {
540
- state.isSSoFlag = action.payload;
541
- }
542
- }
543
- });
544
- const { setIsSSOFlag } = SsoAppSlice.actions;
545
- SsoAppSlice.reducer;
546
510
  const App = ({ desktopCollapsed }) => {
547
- const dispatch = useDispatch();
548
511
  const [openModal, setOpenModal] = useState(null);
549
512
  const modalRef = useRef(null);
550
513
  useClickModals(modalRef, () => setOpenModal(null));
551
514
  const getUserProfileDetails = async () => {
552
515
  try {
553
516
  const response = await getUserDetails();
554
- dispatch(setUserProfile(transformUser(response)));
555
517
  } catch (error) {
556
518
  console.log(error);
557
519
  }
558
520
  };
559
521
  useEffect(() => {
560
522
  const currentUrl = window.location.href;
561
- if (currentUrl.includes("sso") || currentUrl.includes("localhost")) {
562
- dispatch(setIsSSOFlag(true));
563
- }
523
+ if (currentUrl.includes("sso") || currentUrl.includes("localhost")) ;
564
524
  console.log(window.location.href, "locationTEST");
565
525
  getUserProfileDetails();
566
526
  }, []);