From 391d97f30d7ba296b723eb05443bb5520cb5eb26 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Mon, 17 Apr 2023 15:57:21 -0400 Subject: [PATCH] Add indexes to simplify route imports --- src/routes/appRoutes/asyncRoutes/index.ts | 1 + src/routes/appRoutes/index.tsx | 6 ++---- src/routes/appRoutes/legacyRoutes/index.ts | 3 +++ src/routes/experimentalAppRoutes/asyncRoutes/index.ts | 2 ++ src/routes/experimentalAppRoutes/index.tsx | 7 ++----- src/routes/experimentalAppRoutes/legacyRoutes/index.ts | 3 +++ 6 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 src/routes/appRoutes/asyncRoutes/index.ts create mode 100644 src/routes/appRoutes/legacyRoutes/index.ts create mode 100644 src/routes/experimentalAppRoutes/asyncRoutes/index.ts create mode 100644 src/routes/experimentalAppRoutes/legacyRoutes/index.ts diff --git a/src/routes/appRoutes/asyncRoutes/index.ts b/src/routes/appRoutes/asyncRoutes/index.ts new file mode 100644 index 0000000000..e5abc85650 --- /dev/null +++ b/src/routes/appRoutes/asyncRoutes/index.ts @@ -0,0 +1 @@ +export * from './user'; diff --git a/src/routes/appRoutes/index.tsx b/src/routes/appRoutes/index.tsx index 07736d6fc9..0136dc5531 100644 --- a/src/routes/appRoutes/index.tsx +++ b/src/routes/appRoutes/index.tsx @@ -5,10 +5,8 @@ import ConnectionRequired from '../../components/ConnectionRequired'; import ServerContentPage from '../../components/ServerContentPage'; import { toAsyncPageRoute } from '../AsyncRoute'; import { toViewManagerPageRoute } from '../LegacyRoute'; -import { ASYNC_USER_ROUTES } from './asyncRoutes/user'; -import { LEGACY_ADMIN_ROUTES } from './legacyRoutes/admin'; -import { LEGACY_PUBLIC_ROUTES } from './legacyRoutes/public'; -import { LEGACY_USER_ROUTES } from './legacyRoutes/user'; +import { ASYNC_USER_ROUTES } from './asyncRoutes'; +import { LEGACY_ADMIN_ROUTES, LEGACY_PUBLIC_ROUTES, LEGACY_USER_ROUTES } from './legacyRoutes'; export const AppRoutes = () => ( diff --git a/src/routes/appRoutes/legacyRoutes/index.ts b/src/routes/appRoutes/legacyRoutes/index.ts new file mode 100644 index 0000000000..2931c568e8 --- /dev/null +++ b/src/routes/appRoutes/legacyRoutes/index.ts @@ -0,0 +1,3 @@ +export * from './admin'; +export * from './public'; +export * from './user'; diff --git a/src/routes/experimentalAppRoutes/asyncRoutes/index.ts b/src/routes/experimentalAppRoutes/asyncRoutes/index.ts new file mode 100644 index 0000000000..9dd4fb3c99 --- /dev/null +++ b/src/routes/experimentalAppRoutes/asyncRoutes/index.ts @@ -0,0 +1,2 @@ +export * from './admin'; +export * from './user'; diff --git a/src/routes/experimentalAppRoutes/index.tsx b/src/routes/experimentalAppRoutes/index.tsx index 47b9ec7e54..bd4cf8a19f 100644 --- a/src/routes/experimentalAppRoutes/index.tsx +++ b/src/routes/experimentalAppRoutes/index.tsx @@ -5,11 +5,8 @@ import ConnectionRequired from '../../components/ConnectionRequired'; import ServerContentPage from '../../components/ServerContentPage'; import { toAsyncPageRoute } from '../AsyncRoute'; import { toViewManagerPageRoute } from '../LegacyRoute'; -import { ASYNC_ADMIN_ROUTES } from './asyncRoutes/admin'; -import { ASYNC_USER_ROUTES } from './asyncRoutes/user'; -import { LEGACY_ADMIN_ROUTES } from './legacyRoutes/admin'; -import { LEGACY_PUBLIC_ROUTES } from './legacyRoutes/public'; -import { LEGACY_USER_ROUTES } from './legacyRoutes/user'; +import { ASYNC_ADMIN_ROUTES, ASYNC_USER_ROUTES } from './asyncRoutes'; +import { LEGACY_ADMIN_ROUTES, LEGACY_PUBLIC_ROUTES, LEGACY_USER_ROUTES } from './legacyRoutes'; export const ExperimentalAppRoutes = () => ( diff --git a/src/routes/experimentalAppRoutes/legacyRoutes/index.ts b/src/routes/experimentalAppRoutes/legacyRoutes/index.ts new file mode 100644 index 0000000000..2931c568e8 --- /dev/null +++ b/src/routes/experimentalAppRoutes/legacyRoutes/index.ts @@ -0,0 +1,3 @@ +export * from './admin'; +export * from './public'; +export * from './user';