From ceb96c80a5e6daca19b7795fcd68583e32fe768f Mon Sep 17 00:00:00 2001 From: Nicholas Kwon Date: Wed, 12 Oct 2022 18:01:29 -0700 Subject: [PATCH] update links to dashboards --- client/components/Header.jsx | 4 ++-- client/components/main/Reports.jsx | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/components/Header.jsx b/client/components/Header.jsx index 9dbad0dcc..f1aaab8e7 100644 --- a/client/components/Header.jsx +++ b/client/components/Header.jsx @@ -84,12 +84,12 @@ const Header = () => { horizontal: 'left', }} > - + Overview - + Compare Two Neighborhoods diff --git a/client/components/main/Reports.jsx b/client/components/main/Reports.jsx index c829f199e..b29436704 100644 --- a/client/components/main/Reports.jsx +++ b/client/components/main/Reports.jsx @@ -17,14 +17,15 @@ const useStyles = makeStyles(theme => ({ }, })); +const REPORTS_PATH = '/reports/'; + const Reports = () => { const [isLoading, setIsLoading] = React.useState(true); const classes = useStyles(); const url = process.env.REPORT_URL; - let reportPath = '/dashboards/overview'; const location = useLocation(); - reportPath = location.pathname.slice(8); + const reportPath = location.pathname.slice(REPORTS_PATH.length - 1); const reportRef = React.useRef(reportPath); React.useEffect(() => {