mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 05:10:45 +00:00
updated to allow empty children in an app, added console log of exceptions that were hidden before
This commit is contained in:
19
src/App.tsx
19
src/App.tsx
@ -159,10 +159,13 @@ export default function App()
|
|||||||
}
|
}
|
||||||
|
|
||||||
const childList: any[] = [];
|
const childList: any[] = [];
|
||||||
app.children.forEach((child: QAppTreeNode) =>
|
if(app.children)
|
||||||
{
|
{
|
||||||
addAppToSideNavList(child, childList, path, depth + 1);
|
app.children.forEach((child: QAppTreeNode) =>
|
||||||
});
|
{
|
||||||
|
addAppToSideNavList(child, childList, path, depth + 1);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (childList.length === 0)
|
if (childList.length === 0)
|
||||||
{
|
{
|
||||||
@ -210,10 +213,13 @@ export default function App()
|
|||||||
const path = `${parentPath}/${app.name}`;
|
const path = `${parentPath}/${app.name}`;
|
||||||
if (app.type === QAppNodeType.APP)
|
if (app.type === QAppNodeType.APP)
|
||||||
{
|
{
|
||||||
app.children.forEach((child: QAppTreeNode) =>
|
if(app.children)
|
||||||
{
|
{
|
||||||
addAppToAppRoutesList(metaData, child, routeList, path, depth + 1);
|
app.children.forEach((child: QAppTreeNode) =>
|
||||||
});
|
{
|
||||||
|
addAppToAppRoutesList(metaData, child, routeList, path, depth + 1);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
routeList.push({
|
routeList.push({
|
||||||
name: `${app.label}`,
|
name: `${app.label}`,
|
||||||
@ -342,6 +348,7 @@ export default function App()
|
|||||||
}
|
}
|
||||||
catch (e)
|
catch (e)
|
||||||
{
|
{
|
||||||
|
console.log(e);
|
||||||
if (e.toString().indexOf("status code 401") !== -1)
|
if (e.toString().indexOf("status code 401") !== -1)
|
||||||
{
|
{
|
||||||
logout();
|
logout();
|
||||||
|
Reference in New Issue
Block a user