diff --git a/app/components/ProjectSelector.tsx b/app/components/ProjectSelector.tsx index 4acf3d9e64..4728f8f6fe 100644 --- a/app/components/ProjectSelector.tsx +++ b/app/components/ProjectSelector.tsx @@ -24,7 +24,7 @@ const BrandIcon = () => ( export const ProjectSelector = () => { const { orgName, projectName } = useAllParams('orgName') - const { data } = useApiQuery('projectList', { orgName, limit: 20 }) + const { data } = useApiQuery('projectList', { orgName, limit: 10 }) // filter out current project if there is one. if there isn't one, it'll be // undefined and it won't match any diff --git a/app/routes.tsx b/app/routes.tsx index ee384aa214..f9c11a0e11 100644 --- a/app/routes.tsx +++ b/app/routes.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { DataBrowserRouter, Navigate, Route } from 'react-router-dom' +import { DataBrowserRouter, Navigate, Route, redirect } from 'react-router-dom' import type { CrumbFunc } from './components/Breadcrumbs' import { RouterDataErrorBoundary } from './components/ErrorBoundary' @@ -72,10 +72,14 @@ export const Router = () => ( } /> {/* These are done here instead of nested so we don't flash a layout on 404s */} - } /> + redirect(`${new URL(request.url).pathname}/projects`)} + /> } + loader={({ request }) => redirect(`${new URL(request.url).pathname}/instances`)} /> }>