diff --git a/src/component/AppBar/AppBarMenu.tsx b/src/component/AppBar/AppBarMenu.tsx index 47c4351..b244fab 100644 --- a/src/component/AppBar/AppBarMenu.tsx +++ b/src/component/AppBar/AppBarMenu.tsx @@ -47,18 +47,11 @@ export const AppBarMenu = (props: Props) => { onClick={handleMenu} sx={{ marginLeft: "auto" }} > - {userAvatar ? ( - ) : ( - img - )} { ); useEffect(() => { - !adminData?.name && dispatch(adminAction()); + !adminData?.name && isAuthenticated && dispatch(adminAction()); !dataSource && dispatch(dataSourceAction()); }, []) diff --git a/src/component/OrganisationDetails/style.scss b/src/component/OrganisationDetails/style.scss index 4bf000f..91d9370 100644 --- a/src/component/OrganisationDetails/style.scss +++ b/src/component/OrganisationDetails/style.scss @@ -21,6 +21,7 @@ } .view-credential { + font-family: "Roboto", "Helvetica", "Arial", sans-serif; text-decoration: underline; font-size: 0.825rem; color: #000; diff --git a/src/container/Account/ManageAdmin/manageAdmin.tsx b/src/container/Account/ManageAdmin/manageAdmin.tsx index e310aaa..37a5cfd 100644 --- a/src/container/Account/ManageAdmin/manageAdmin.tsx +++ b/src/container/Account/ManageAdmin/manageAdmin.tsx @@ -328,6 +328,7 @@ const ManageAdmin = () => { width: "100%", display: "flex", justifyContent: "right", + marginTop: "35px" }} > { const { t } = useTranslation("translation"); + const dispatch = useAppDispatch(); const [selectedValue, setSelectedValue] = useState('option 1') const dataSourceItems = useAppSelector( (state) => state?.dataSourceList?.data?.dataSources ); + useEffect(() => { + !dataSourceItems?.length && dispatch(dataSourceAction()); + }, []) + const handleChange = (event) => { setSelectedValue(event.target.value) } + console.log(dataSourceItems?.length ,"dataSourceItems?.length"); return ( <> { diff --git a/src/container/Login/index.tsx b/src/container/Login/index.tsx index c1ff9d5..1cfee0a 100644 --- a/src/container/Login/index.tsx +++ b/src/container/Login/index.tsx @@ -16,8 +16,7 @@ import { Link, useNavigate } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import SnackbarComponent from '../../component/notification'; import { useAppDispatch } from "../../customHooks"; -import { loginAction } from "../../redux/actionCreators/login"; -import { LocalStorageService } from '../../utils/localStorageService'; +import { adminAction, loginAction } from "../../redux/actionCreators/login"; interface FormValue { email: string, @@ -46,6 +45,7 @@ const Login = () => { }, []); const callback = (isLogin) => { + dispatch(adminAction()); isLogin ? navigate('/start') : setOpenSnackBar(true); } diff --git a/src/redux/sagas/loginSaga.ts b/src/redux/sagas/loginSaga.ts index 3a51ed0..d4c925f 100644 --- a/src/redux/sagas/loginSaga.ts +++ b/src/redux/sagas/loginSaga.ts @@ -1,11 +1,9 @@ -import { all, put, takeLatest } from 'redux-saga/effects'; +import { put, takeLatest } from 'redux-saga/effects'; import * as actionTypes from '../actionTypes/login'; import * as loginAction from '../actionCreators/login'; -import { doApiGet, doApiPost, doApiGetBlob } from '../../utils/fetchWrapper'; +import { doApiGet, doApiPost } from '../../utils/fetchWrapper'; import { ENDPOINTS } from '../../utils/apiEndpoints'; import { LocalStorageService } from '../../utils/localStorageService'; -import { imageBlobToBase64 } from '../../utils/utils'; -import * as gettingStartAction from '../actionCreators/gettingStart'; export function* login(action) { const { email, password, callback } = action.payload;