แก้ route

This commit is contained in:
setthawutttty 2024-11-15 11:01:36 +07:00
parent 8e6231acb9
commit e1055391be
8 changed files with 757 additions and 11 deletions

View file

@ -11,7 +11,17 @@ const manual = data.filter((v: any) => v.children);
const mergeManual: any[] = [];
manual.forEach((v: any) => mergeManual.push(...v.children));
manual.forEach((v: any) => {
if (v.children) {
v.children.forEach((child: any) => {
if (child.children) {
mergeManual.push(...child.children);
} else {
mergeManual.push(child);
}
});
}
});
const manualRoute = mergeManual.map(
(v): { path: string; name: string; component: Function } => {