Commit 7cba148c authored by Zhou Fang's avatar Zhou Fang Committed by Martin Lowe
Browse files

#475 Fixed not work properly on IE

parent fb88dc94
......@@ -226,8 +226,10 @@ html {
.portal-login-page .portal-login-image {
position: fixed;
z-index: -10;
width: 110%;
height: 110%;
left: -30px;
top: -30px;
right: -30px;
bottom: -30px;
background-image: url('assets/images/placeholderImg.jpg');
background-position: center;
background-size: cover;
......
......@@ -85,3 +85,5 @@ export const showErrMsg = (
break;
}
};
export const isIE = () => navigator.userAgent.indexOf('MSIE') > -1 || navigator.userAgent.indexOf('Trident') > -1;
......@@ -28,7 +28,7 @@ import SectionCtn from '../../../UIComponents/CustomContainer/SectionCtn';
import { useContext, useEffect, useState } from 'react';
import { fetchWrapper } from '../../../../Utils/formFunctionHelpers';
import { useHistory } from 'react-router';
import { checkPermission, pickRandomItems, renderItemList } from '../../../../Utils/portalFunctionHelpers';
import { checkPermission, isIE, pickRandomItems, renderItemList } from '../../../../Utils/portalFunctionHelpers';
import PortalContext from '../../../../Context/PortalContext';
import HelpIcon from '@material-ui/icons/Help';
import DashboardCommittersAndContributorsChart from './DashboardCommittersAndContributorsChart';
......@@ -144,8 +144,17 @@ export default function DashboardCommittersAndContributors() {
const [isFetchingContributors, setIsFetchingContributors] = useState(true);
const [isFetchingCBI, setIsFetchingCBI] = useState(true);
const [anchorEle, setAnchorEle] = useState<HTMLElement | null>(null);
const { orgId, setContactFilterRole, committers, setCommitters, contributors, setContributors, cbiData, setCBIData, currentUserPortal } =
useContext(PortalContext);
const {
orgId,
setContactFilterRole,
committers,
setCommitters,
contributors,
setContributors,
cbiData,
setCBIData,
currentUserPortal,
} = useContext(PortalContext);
const open = Boolean(anchorEle);
useEffect(() => {
......@@ -368,7 +377,7 @@ export default function DashboardCommittersAndContributors() {
</Grid>
</Grid>
<Grid item xs lg={6}>
<DashboardCommittersAndContributorsChart />
{!isIE() && <DashboardCommittersAndContributorsChart />}
</Grid>
</Grid>
</SectionCtn>
......
......@@ -46,7 +46,7 @@ const useStyles = makeStyles((theme: Theme) =>
},
overviewIcon: {
height: '100%',
height: 90,
width: 85,
padding: theme.spacing(2),
marginRight: theme.spacing(1),
......
......@@ -324,8 +324,10 @@ html {
.portal-login-image {
position: fixed;
z-index: -10;
width: 110%;
height: 110%;
left: -30px;
top: -30px;
right: -30px;
bottom: -30px;
background-image: url('assets/images/placeholderImg.jpg');
background-position: center;
background-size: cover;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment