diff --git a/components/charts/bar-chart-simple.tsx b/components/charts/bar-chart-simple.tsx index 5613ba7..fad4e08 100644 --- a/components/charts/bar-chart-simple.tsx +++ b/components/charts/bar-chart-simple.tsx @@ -92,7 +92,7 @@ const BarChartSimple: FC = ({ chartData, allMonths, month }) => { sessionStorage.removeItem(scrollPositionKey); }, []); - const selectMonthNames = allMonths.map((month) => month.name); + const selectMonthNames = allMonths.map((month) => month.name).slice(0, -1); return ( diff --git a/components/new-old-companies-card.tsx b/components/new-old-companies-card.tsx index 8b4d355..2e1c83f 100644 --- a/components/new-old-companies-card.tsx +++ b/components/new-old-companies-card.tsx @@ -31,7 +31,8 @@ const scrollPositionKey = getScrollPositionKey('root'); const NewOldCompaniesCard: FC = ({ newOldCompanies, allMonths, month }) => { const { replace } = useRouter(); - const selectMonthNames = allMonths.map((month) => month.name); + // remove last item to prevent exception + const selectMonthNames = allMonths.map((month) => month.name).slice(0, -1); const { firstTimeCompanies,