Refactor MainContainer child routes to consistent relative-path nesting

Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
2026-03-08 19:10:52 +08:00
parent b3f4ace13f
commit f3d11ebbcb

View File

@@ -54,65 +54,65 @@ const routes = [
}, },
children: [ children: [
{ {
path: "/member-area", path: "member-area",
name: "MemberArea", name: "MemberArea",
component: MemberArea, component: MemberArea,
}, },
{ {
path: "/files", path: "files",
name: "Files", name: "Files",
component: Files, component: Files,
}, },
{ {
path: "/account", path: "",
name: "Account Management", name: "Account Management",
children: [ children: [
{ {
path: "/account-admin", path: "account-admin",
name: "AcctAdmin", name: "AcctAdmin",
component: AccountAdmin, component: AccountAdmin,
}, },
], ],
}, },
{ {
path: "/my-account", path: "my-account",
name: "My Account", name: "My Account",
component: MyAccount, component: MyAccount,
}, },
{ {
path: "/upload", // router.push({ replace: true }) does not add the path to history path: "upload", // router.push({ replace: true }) does not add the path to history
name: "Upload", name: "Upload",
component: Upload, component: Upload,
}, },
{ {
path: "/discover", path: "discover",
name: "Discover", name: "Discover",
children: [ children: [
{ {
// type: log | filter, the parameter can be either. // type: log | filter, the parameter can be either.
// fileId: log_id | filter_id, the parameter can be either. // fileId: log_id | filter_id, the parameter can be either.
path: "/discover/:type/:fileId/map", path: ":type/:fileId/map",
name: "Map", name: "Map",
component: Map, component: Map,
}, },
{ {
// type: log | filter, the parameter can be either. // type: log | filter, the parameter can be either.
// fileId: log_id | filter_id, the parameter can be either. // fileId: log_id | filter_id, the parameter can be either.
path: "/discover/:type/:fileId/conformance", path: ":type/:fileId/conformance",
name: "Conformance", name: "Conformance",
component: Conformance, component: Conformance,
}, },
{ {
// type: log | filter, the parameter can be either. // type: log | filter, the parameter can be either.
// fileId: log_id | filter_id, the parameter can be either. // fileId: log_id | filter_id, the parameter can be either.
path: "/discover/:type/:fileId/performance", path: ":type/:fileId/performance",
name: "Performance", name: "Performance",
component: Performance, component: Performance,
}, },
{ {
// type: log | filter, the parameter can be either. // type: log | filter, the parameter can be either.
// fileId: check_id, fetches parent data via `/log-checks/{check_id}` // fileId: check_id, fetches parent data via `/log-checks/{check_id}`
path: "/discover/conformance/:type/:fileId/map", path: "conformance/:type/:fileId/map",
name: "CheckMap", name: "CheckMap",
component: Map, component: Map,
meta: { meta: {
@@ -122,7 +122,7 @@ const routes = [
{ {
// type: log | filter, the parameter can be either. // type: log | filter, the parameter can be either.
// fileId: check_id, fetches parent data via `/log-checks/{check_id}` // fileId: check_id, fetches parent data via `/log-checks/{check_id}`
path: "/discover/conformance/:type/:fileId/conformance", path: "conformance/:type/:fileId/conformance",
name: "CheckConformance", name: "CheckConformance",
component: Conformance, component: Conformance,
meta: { meta: {
@@ -132,7 +132,7 @@ const routes = [
{ {
// type: log | filter, the parameter can be either. // type: log | filter, the parameter can be either.
// fileId: check_id, fetches parent data via `/log-checks/{check_id}` // fileId: check_id, fetches parent data via `/log-checks/{check_id}`
path: "/discover/conformance/:type/:fileId/performance", path: "conformance/:type/:fileId/performance",
name: "CheckPerformance", name: "CheckPerformance",
component: Performance, component: Performance,
meta: { meta: {
@@ -142,16 +142,16 @@ const routes = [
], ],
}, },
{ {
path: "/compare", path: "compare",
name: "Compare", name: "Compare",
children: [ children: [
{ {
path: "/compare/dashboard/:primaryType/:primaryId/:secondaryType/:secondaryId", path: "dashboard/:primaryType/:primaryId/:secondaryType/:secondaryId",
name: "CompareDashboard", name: "CompareDashboard",
component: CompareDashboard, component: CompareDashboard,
}, },
{ {
path: "/compare/map/:primaryType/:primaryId/:secondaryType/:secondaryId", path: "map/:primaryType/:primaryId/:secondaryType/:secondaryId",
name: "MapCompare", name: "MapCompare",
component: MapCompare, component: MapCompare,
}, },