fixing and modifications
This commit is contained in:
1 parent
5c31e38b2d
commit
1e39de5900
3 files changed
+19
-6
No files matched your search
@@ -8,6 +8,7 @@ import AllInclusiveIcon from "../../assets/Images/Icon-link-gray.png";
|
||||
import SettingsIcon from "../../assets/Images/Icon-setting-gray.png";
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { useNavigate, useLocation } from "react-router-dom";
|
||||
import pathMap from "../../Utils/PathMap";
|
||||
|
||||
/**
|
||||
* @component
|
||||
@@ -38,35 +39,35 @@ function DashboardMenu() {
|
||||
"Monitors",
|
||||
"/monitors",
|
||||
activeButton === "/monitors",
|
||||
() => handleClick("Monitors", "/monitors")
|
||||
() => handleClick(pathMap["/monitors"], "/monitors")
|
||||
)}
|
||||
{DashboardMenuButton(
|
||||
Incidents,
|
||||
"Incidents",
|
||||
"/incidents",
|
||||
activeButton === "/incidents",
|
||||
() => handleClick("Incidents", "/incidents")
|
||||
() => handleClick(pathMap["/incidents"], "/incidents")
|
||||
)}
|
||||
{DashboardMenuButton(
|
||||
SensorsIcon,
|
||||
"Status Pages",
|
||||
"/status",
|
||||
activeButton === "/status",
|
||||
() => handleClick("Status Pages", "/status")
|
||||
() => handleClick(pathMap["/status"], "/status")
|
||||
)}
|
||||
{DashboardMenuButton(
|
||||
AllInclusiveIcon,
|
||||
"Integrations",
|
||||
"/integrations",
|
||||
activeButton === "/integrations",
|
||||
() => handleClick("Integrations", "/integrations")
|
||||
() => handleClick(pathMap["/integrations"], "/integrations")
|
||||
)}
|
||||
{DashboardMenuButton(
|
||||
SettingsIcon,
|
||||
"Settings",
|
||||
"/settings",
|
||||
activeButton === "/settings",
|
||||
() => handleClick("Settings", "/settings")
|
||||
() => handleClick(pathMap["/settings"], "/settings")
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
const pathMap = {
|
||||
"/monitors": "Monitors",
|
||||
"/incidents": "Incidents",
|
||||
"/status" : "Status Pages",
|
||||
"/integrations": "Integrations",
|
||||
"/settings" : "Settings"
|
||||
}
|
||||
|
||||
export default pathMap;
|
||||
@@ -4,4 +4,7 @@ import react from '@vitejs/plugin-react'
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
})
|
||||
optimizeDeps: {
|
||||
include: ['@mui/material/Tooltip', '@emotion/styled'],
|
||||
},
|
||||
})
|
||||
Reference in new issue
Block a user