diff --git a/client/src/components/AppBar.jsx b/client/src/components/AppBar.jsx index 76134ac..f77cba4 100644 --- a/client/src/components/AppBar.jsx +++ b/client/src/components/AppBar.jsx @@ -1,52 +1,47 @@ -import AppBar from '@mui/material/AppBar'; -import Box from '@mui/material/Box'; -import Toolbar from '@mui/material/Toolbar'; -import Typography from '@mui/material/Typography'; -import Button from '@mui/material/Button'; -import { Link } from 'react-router-dom'; -import { useDispatch, useSelector } from 'react-redux'; -import { setMessage } from '../reducers/messageReducer'; +import { ArgumentScale, Animation } from '@devexpress/dx-react-chart'; +import { scaleBand } from '@devexpress/dx-chart-core'; -const linkStyle = { - textDecoration: 'none', - color: 'white', - cursor: 'pointer' -} +import Paper from '@mui/material/Paper'; +import { + Chart, + BarSeries, + ArgumentAxis, + ValueAxis, + Tooltip, +} from '@devexpress/dx-react-chart-material-ui'; +import { EventTracker } from '@devexpress/dx-react-chart'; +import { Typography } from '@mui/material'; -export default function ButtonAppBar() { - const user = useSelector(state => state.auth.user) - const dispatch = useDispatch() +const TransactionChart = ({chartData}) => { - const logout = () => { - localStorage.removeItem('expenseTrackerToken') - dispatch(setMessage(['User logged out', true])) - setTimeout(() => dispatch(setMessage(null)), 5000) + if(!chartData.length>0){ + return( + + Add a transaction to view chart + + ) } - return ( - - - - - - Expense Tracker - + return ( + //changed width from 80% to 100% + + - {user && - <> - - - - } + + + - {!user && - <> - - - - } - - - - ); + + + + + + + ); } +export default TransactionChart diff --git a/client/src/components/TransactionChart.jsx b/client/src/components/TransactionChart.jsx index 6166305..f77cba4 100644 --- a/client/src/components/TransactionChart.jsx +++ b/client/src/components/TransactionChart.jsx @@ -18,12 +18,13 @@ const TransactionChart = ({chartData}) => { return( Add a transaction to view chart - + ) } return ( - + //changed width from 80% to 100% +