diff --git a/dashboard/components/dashboard/components/cloud-map/DashboardCloudMapChart.tsx b/dashboard/components/dashboard/components/cloud-map/DashboardCloudMapChart.tsx
index 3c9936de1..2c6f9ef30 100644
--- a/dashboard/components/dashboard/components/cloud-map/DashboardCloudMapChart.tsx
+++ b/dashboard/components/dashboard/components/cloud-map/DashboardCloudMapChart.tsx
@@ -5,6 +5,7 @@ import {
Geography,
Marker
} from 'react-simple-maps';
+import Link from 'next/link';
import { DashboardCloudMapRegions } from './hooks/useCloudMap';
import { DashboardCloudMapTooltipProps } from './hooks/useCloudMapTooltip';
@@ -54,12 +55,7 @@ function DashboardCloudMapChart({
{regionsAscendingByNumberOfResources &&
regionsAscendingByNumberOfResources.map((region, idx) => (
-
+
@@ -87,7 +83,7 @@ function DashboardCloudMapChart({
strokeWidth={1.5}
/>
-
+
))}
);
diff --git a/dashboard/components/dashboard/components/resources-manager/hooks/useResourcesManagerChart.tsx b/dashboard/components/dashboard/components/resources-manager/hooks/useResourcesManagerChart.tsx
index f6c19cc5a..de91123cd 100644
--- a/dashboard/components/dashboard/components/resources-manager/hooks/useResourcesManagerChart.tsx
+++ b/dashboard/components/dashboard/components/resources-manager/hooks/useResourcesManagerChart.tsx
@@ -1,5 +1,6 @@
import { ChartData, ChartOptions } from 'chart.js';
import { Dispatch, SetStateAction, useState } from 'react';
+import { useRouter } from 'next/router';
import formatNumber from '../../../../../utils/formatNumber';
import {
ResourcesManagerData,
@@ -23,6 +24,7 @@ function useResourcesManagerChart({
setQuery,
initialQuery
}: useResourcesManagerChartProps) {
+ const router = useRouter();
const colors = ['#FF9A87', '#6DB7FF', '#B6D3B4', '#FFB459', '#59ACAC'];
/* To be un-commented when 'view' is supported
@@ -78,10 +80,7 @@ function useResourcesManagerChart({
const clickedIndex = legendItem[0].index || 0;
const labels = legend.config.data.labels ?? [];
- window.open(
- `./inventory?${currentQuery}:IS:${labels[clickedIndex]}`,
- '_blank'
- );
+ router.push(`/inventory?${currentQuery}:IS:${labels[clickedIndex]}`);
},
aspectRatio: 2,
layout: {
diff --git a/dashboard/components/navbar/Navbar.tsx b/dashboard/components/navbar/Navbar.tsx
index 5142936fd..34202afde 100644
--- a/dashboard/components/navbar/Navbar.tsx
+++ b/dashboard/components/navbar/Navbar.tsx
@@ -20,7 +20,7 @@ function Navbar() {