Skip to content

Commit

Permalink
Fix: #113, loader issue, #112, #111 admin data loading issue, #110, #69
Browse files Browse the repository at this point in the history
…, #62
  • Loading branch information
karthik cs authored and georgepadayatti committed Apr 8, 2024
1 parent 2e904ae commit c3d6d12
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
9 changes: 1 addition & 8 deletions src/component/AppBar/AppBarMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,11 @@ export const AppBarMenu = (props: Props) => {
onClick={handleMenu}
sx={{ marginLeft: "auto" }}
>
{userAvatar ? (
<img
style={{ width: "50px", height: "50px", borderRadius: "50%" }}
src={defaultAvatar}
/>
) : (
<img
style={{ width: "50px", height: "50px", borderRadius: "50%" }}
src={defaultAvatar}
src={defaultLogoImg}
alt="img"
/>
)}
</IconButton>
<Menu
sx={{ mt: "65px" }}
Expand Down
2 changes: 1 addition & 1 deletion src/component/Layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const Layout = ({ children }) => {
);

useEffect(() => {
!adminData?.name && dispatch(adminAction());
!adminData?.name && isAuthenticated && dispatch(adminAction());
!dataSource && dispatch(dataSourceAction());
}, [])

Expand Down
1 change: 1 addition & 0 deletions src/component/OrganisationDetails/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
}

.view-credential {
font-family: "Roboto", "Helvetica", "Arial", sans-serif;
text-decoration: underline;
font-size: 0.825rem;
color: #000;
Expand Down
1 change: 1 addition & 0 deletions src/container/Account/ManageAdmin/manageAdmin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ const ManageAdmin = () => {
width: "100%",
display: "flex",
justifyContent: "right",
marginTop: "35px"
}}
>
<Typography
Expand Down
11 changes: 9 additions & 2 deletions src/container/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,32 @@ import {
Typography,
FormControl
} from "@mui/material";
import React, { useState } from 'react';
import React, { useEffect, useState } from 'react';
import { gridSpacing } from '../../constants/constant';
import DataSourceCard from './DataSource';
import './style.scss';
import { useAppSelector } from "../../customHooks";
import { useAppSelector, useAppDispatch } from "../../customHooks";
import { useTranslation } from "react-i18next";
import Loader from "../../component/Loader";
import { dataSourceAction } from "../../redux/actionCreators/dataSource";

const LandingPage = () => {
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 (
<>
{
Expand Down
4 changes: 2 additions & 2 deletions src/container/Login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -46,6 +45,7 @@ const Login = () => {
}, []);

const callback = (isLogin) => {
dispatch(adminAction());
isLogin ? navigate('/start') : setOpenSnackBar(true);
}

Expand Down
6 changes: 2 additions & 4 deletions src/redux/sagas/loginSaga.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit c3d6d12

Please sign in to comment.