From 25dd704dd4efca0ee0c844d19b805142c733d91b Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Tue, 18 Mar 2025 14:55:11 -0600 Subject: [PATCH] remove app root file path --- web/src/app/auth/login/page.tsx | 2 +- web/src/components/features/auth/ResetPasswordForm.tsx | 2 +- web/src/components/ui/breadcrumb/Breadcrumb.stories.tsx | 6 +++--- web/src/components/ui/sidebar/Sidebar.stories.tsx | 6 +++--- web/src/components/ui/sidebar/SidebarItem.stories.tsx | 2 +- web/src/context/RoutePrefetcher.tsx | 2 +- web/src/routes/busterRoutes/busterAppRoutes.ts | 2 -- web/src/server_context/supabaseAuthMethods/signIn.ts | 2 +- 8 files changed, 11 insertions(+), 13 deletions(-) diff --git a/web/src/app/auth/login/page.tsx b/web/src/app/auth/login/page.tsx index bf24fea68..e5d681832 100644 --- a/web/src/app/auth/login/page.tsx +++ b/web/src/app/auth/login/page.tsx @@ -12,7 +12,7 @@ export default async function Login() { if (user?.id) { return redirect( createBusterRoute({ - route: BusterRoutes.APP_ROOT + route: BusterRoutes.APP_HOME }) ); } diff --git a/web/src/components/features/auth/ResetPasswordForm.tsx b/web/src/components/features/auth/ResetPasswordForm.tsx index d0b623dfc..22946310e 100644 --- a/web/src/components/features/auth/ResetPasswordForm.tsx +++ b/web/src/components/features/auth/ResetPasswordForm.tsx @@ -37,7 +37,7 @@ export const ResetPasswordForm: React.FC<{ setCountdown((prev) => { if (prev === 0) { clearInterval(interval); - router.replace(createBusterRoute({ route: BusterRoutes.APP_ROOT })); + router.replace(createBusterRoute({ route: BusterRoutes.APP_HOME })); return 0; } return prev - 1; diff --git a/web/src/components/ui/breadcrumb/Breadcrumb.stories.tsx b/web/src/components/ui/breadcrumb/Breadcrumb.stories.tsx index bb49b1874..a347431ff 100644 --- a/web/src/components/ui/breadcrumb/Breadcrumb.stories.tsx +++ b/web/src/components/ui/breadcrumb/Breadcrumb.stories.tsx @@ -17,7 +17,7 @@ type Story = StoryObj; export const Default: Story = { args: { items: [ - { label: 'Home', route: { route: BusterRoutes.APP_ROOT } }, + { label: 'Home', route: { route: BusterRoutes.APP_HOME } }, { label: 'Datasets', route: { route: BusterRoutes.APP_DATASETS } }, { label: 'Current Dataset' } ] @@ -27,7 +27,7 @@ export const Default: Story = { export const WithDropdown: Story = { args: { items: [ - { label: 'Home', route: { route: BusterRoutes.APP_ROOT } }, + { label: 'Home', route: { route: BusterRoutes.APP_HOME } }, { label: null, dropdown: [ @@ -44,7 +44,7 @@ export const WithDropdown: Story = { export const CustomActiveIndex: Story = { args: { items: [ - { label: 'Home', route: { route: BusterRoutes.APP_ROOT } }, + { label: 'Home', route: { route: BusterRoutes.APP_HOME } }, { label: 'Datasets', route: { route: BusterRoutes.APP_DATASETS } }, { label: 'Settings', route: { route: BusterRoutes.SETTINGS_API_KEYS } }, { label: 'Profile' } diff --git a/web/src/components/ui/sidebar/Sidebar.stories.tsx b/web/src/components/ui/sidebar/Sidebar.stories.tsx index a789b6f49..8adec438e 100644 --- a/web/src/components/ui/sidebar/Sidebar.stories.tsx +++ b/web/src/components/ui/sidebar/Sidebar.stories.tsx @@ -25,7 +25,7 @@ const mockItems = [ id: '1', label: 'Home', icon: , - route: BusterRoutes.APP_ROOT + route: BusterRoutes.APP_HOME }, { id: '2', @@ -88,7 +88,7 @@ export const WithLongContent: Story = { id: `item-${i}`, label: `Menu Item ${i + 1}`, icon: , - route: BusterRoutes.APP_ROOT + route: BusterRoutes.APP_HOME })) } ], @@ -121,7 +121,7 @@ export const ScrollAndTruncationTest: Story = { id: `short-${i}`, label: `Item ${i + 1}`, icon: , - route: BusterRoutes.APP_ROOT + route: BusterRoutes.APP_HOME })) }, { diff --git a/web/src/components/ui/sidebar/SidebarItem.stories.tsx b/web/src/components/ui/sidebar/SidebarItem.stories.tsx index 0c2e380e1..f7234f6a2 100644 --- a/web/src/components/ui/sidebar/SidebarItem.stories.tsx +++ b/web/src/components/ui/sidebar/SidebarItem.stories.tsx @@ -38,7 +38,7 @@ export const Default: Story = { args: { label: 'Home', icon: , - route: BusterRoutes.APP_ROOT, + route: BusterRoutes.APP_HOME, id: 'home' } }; diff --git a/web/src/context/RoutePrefetcher.tsx b/web/src/context/RoutePrefetcher.tsx index 5876c8328..32c0927bc 100644 --- a/web/src/context/RoutePrefetcher.tsx +++ b/web/src/context/RoutePrefetcher.tsx @@ -46,7 +46,7 @@ export const RoutePrefetcher: React.FC = React.memo(() => { PRIORITY_ROUTES.forEach((route) => { // For routes that don't require additional parameters if ( - route === BusterRouteEnum.APP_ROOT || + route === BusterRouteEnum.APP_HOME || route === BusterRouteEnum.APP_COLLECTIONS || route === BusterRouteEnum.APP_DASHBOARDS || route === BusterRouteEnum.APP_METRIC || diff --git a/web/src/routes/busterRoutes/busterAppRoutes.ts b/web/src/routes/busterRoutes/busterAppRoutes.ts index b6a63fe7f..4099e6377 100644 --- a/web/src/routes/busterRoutes/busterAppRoutes.ts +++ b/web/src/routes/busterRoutes/busterAppRoutes.ts @@ -1,5 +1,4 @@ export enum BusterAppRoutes { - APP_ROOT = '/app', APP_HOME = '/app/home', APP_COLLECTIONS = '/app/collections', APP_COLLECTIONS_ID = '/app/collections/:collectionId', @@ -38,7 +37,6 @@ export enum BusterAppRoutes { } export type BusterAppRoutesWithArgs = { - [BusterAppRoutes.APP_ROOT]: { route: BusterAppRoutes.APP_ROOT }; [BusterAppRoutes.APP_HOME]: { route: BusterAppRoutes.APP_HOME }; [BusterAppRoutes.APP_COLLECTIONS]: { route: BusterAppRoutes.APP_COLLECTIONS }; [BusterAppRoutes.APP_COLLECTIONS_ID]: { diff --git a/web/src/server_context/supabaseAuthMethods/signIn.ts b/web/src/server_context/supabaseAuthMethods/signIn.ts index 6fe697682..eda52ae4d 100644 --- a/web/src/server_context/supabaseAuthMethods/signIn.ts +++ b/web/src/server_context/supabaseAuthMethods/signIn.ts @@ -116,7 +116,7 @@ export const signUp = async ({ email, password }: { email: string; password: str return redirect( createBusterRoute({ - route: BusterRoutes.APP_ROOT + route: BusterRoutes.APP_HOME }) ); };