CEC-3944 Remove paths dashboard (#307)

This commit is contained in:
John Wu
2023-03-29 15:31:45 -07:00
committed by GitHub
parent 7dd4a1c4c0
commit c2780a066f
13 changed files with 64 additions and 455 deletions

View File

@@ -0,0 +1,30 @@
const INVALID_DASHBOARD = {
label: "Invalid Dashboard",
error: "Invalid Dashboard"
}
export const CustomDashboardList = [
/*
{
label: "IFrame example",
url: `https://www.fiskerinc.com/page.html`
},
{
label: "Custom Component Example",
component: <MyCustomComponent />
}
*/
];
export const getCustomDashboard = (index) => {
if (index < 0 || index >= CustomDashboardList.length) return INVALID_DASHBOARD;
return CustomDashboardList[index];
};
export const getCustomDashboardSubmenu = (role) => {
return CustomDashboardList.map((item, index) => ({
label: item.label,
to: `/dashboards/${index}`,
rolesPerProvider: role,
}));
}