diff --git a/new-lamassu-admin/src/pages/Analytics/Analytics.jsx b/new-lamassu-admin/src/pages/Analytics/Analytics.jsx index e27f2aa6..679afad5 100644 --- a/new-lamassu-admin/src/pages/Analytics/Analytics.jsx +++ b/new-lamassu-admin/src/pages/Analytics/Analytics.jsx @@ -1,6 +1,4 @@ -import { useQuery, gql } from "@apollo/client"; -import Box from '@mui/material/Box' -import { makeStyles } from '@mui/styles' +import { useQuery, gql } from '@apollo/client' import classnames from 'classnames' import { endOfToday } from 'date-fns' import { subDays, format, add, startOfWeek } from 'date-fns/fp' @@ -17,15 +15,12 @@ import { fromNamespace } from 'src/utils/config' import { numberToFiatAmount } from 'src/utils/number' import { DAY, WEEK, MONTH } from 'src/utils/time' -import styles from './Analytics.styles' import LegendEntry from './components/LegendEntry' import HourOfDayWrapper from './components/wrappers/HourOfDayWrapper' import OverTimeWrapper from './components/wrappers/OverTimeWrapper' import TopMachinesWrapper from './components/wrappers/TopMachinesWrapper' import VolumeOverTimeWrapper from './components/wrappers/VolumeOverTimeWrapper' -const useStyles = makeStyles(styles) - const MACHINE_OPTIONS = [{ code: 'all', display: 'All machines' }] const REPRESENTING_OPTIONS = [ { code: 'overTime', display: 'Over time' }, @@ -106,26 +101,28 @@ const GET_DATA = gql` } ` -const OverviewEntry = ({ label, value, oldValue, currency }) => { - const classes = useStyles() +const VerticalLine = () => ( +
+) +const OverviewEntry = ({ label, value, oldValue, currency }) => { const _oldValue = !oldValue || R.equals(oldValue, 0) ? 1 : oldValue const growthRate = ((value - oldValue) * 100) / _oldValue const growthClasses = { - [classes.growthPercentage]: true, - [classes.growth]: R.gt(value, oldValue), - [classes.decline]: R.gt(oldValue, value) + 'font-bold': true, + 'text-malachite': R.gt(value, oldValue), + 'text-tomato': R.gt(oldValue, value) } return ( -{label}
-{label}
diff --git a/new-lamassu-admin/src/pages/Analytics/components/tooltips/GraphTooltip.jsx b/new-lamassu-admin/src/pages/Analytics/components/tooltips/GraphTooltip.jsx index e48bdd87..67afc8c3 100644 --- a/new-lamassu-admin/src/pages/Analytics/components/tooltips/GraphTooltip.jsx +++ b/new-lamassu-admin/src/pages/Analytics/components/tooltips/GraphTooltip.jsx @@ -10,10 +10,6 @@ import { numberToFiatAmount } from 'src/utils/number' import { singularOrPlural } from 'src/utils/string' import { formatDate, formatDateNonUtc } from 'src/utils/timezones' -import styles from './GraphTooltip.styles' - -const useStyles = makeStyles(styles) - const GraphTooltip = ({ coords, data, @@ -22,8 +18,6 @@ const GraphTooltip = ({ currency, representing }) => { - const classes = useStyles(coords) - const formattedDateInterval = !R.includes('hourOfDay', representing.code) ? [ formatDate(dateInterval[1], null, 'MMM d'), @@ -48,28 +42,30 @@ const GraphTooltip = ({ ) return ( -+
{R.length(data)}{' '} {singularOrPlural(R.length(data), 'transaction', 'transactions')}
-+
{numberToFiatAmount(transactions.volume)} {currency} in volume
-