diff --git a/portals/admin/src/main/webapp/source/src/app/components/APISettings/UsageReport.jsx b/portals/admin/src/main/webapp/source/src/app/components/APISettings/UsageReport.jsx index 6e7abcea541..bb343b7a410 100644 --- a/portals/admin/src/main/webapp/source/src/app/components/APISettings/UsageReport.jsx +++ b/portals/admin/src/main/webapp/source/src/app/components/APISettings/UsageReport.jsx @@ -236,25 +236,27 @@ export default function UsageReport() { const [selectedEndDate, setSelectedEndDate] = useState(endDate); const fetchTransactionData = () => { + if (!selectedStartDate || !selectedEndDate) { + return; + } + setLoading(true); - if (selectedStartDate && selectedEndDate) { - const api = new API(); - api.getTransactionCount({ - startTime: selectedStartDate.unix().toString(), - endTime: selectedEndDate.unix().toString(), + const api = new API(); + api.getTransactionCount({ + startTime: selectedStartDate.valueOf().toString(), + endTime: selectedEndDate.valueOf().toString(), + }) + .then((result) => { + setTransactionCount(result.body.count); }) - .then((result) => { - setTransactionCount(result.body.count); - }) - .catch((error) => { - console.error('Error fetching transaction count:', error); - throw error; - }) - .finally(() => { - setLoading(false); - }); - } + .catch((error) => { + console.error('Error fetching transaction count:', error); + throw error; + }) + .finally(() => { + setLoading(false); + }); }; useEffect(() => { diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Applications/Details/index.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Applications/Details/index.jsx index d2de4679e93..0c7fea8c84b 100755 --- a/portals/devportal/src/main/webapp/source/src/app/components/Applications/Details/index.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Applications/Details/index.jsx @@ -134,14 +134,14 @@ const Root = styled('div')(( display: 'flex', flex: 1, flexDirection: 'column', - marginLeft: (theme.custom.leftMenu.position === 'vertical-left' ? (theme.custom.leftMenu.width - 4) : 0), + marginLeft: (theme.custom.leftMenu.position === 'vertical-left' ? (theme.custom.leftMenu.width) : 0), marginRight: (theme.custom.leftMenu.position === 'vertical-right' ? theme.custom.leftMenu.width : 0), paddingBottom: theme.spacing(3), overflowX: 'hidden', [theme.breakpoints.down('md')]: { - marginLeft: (theme.custom.leftMenu.position === 'vertical-left' ? (theme.custom.leftMenu.width - 4) : 0) !== 0 && 50, - marginRight: (theme.custom.leftMenu.position === 'vertical-right' ? theme.custom.leftMenu.width : 0) !== 0 && 50, - }, + marginLeft: 0, + marginRight: 0, +}, }, [`& .${classes.contentLoader}`]: {