diff --git a/src/app/services/page.tsx b/src/app/services/page.tsx index bc4fbff80..f8a8883ca 100644 --- a/src/app/services/page.tsx +++ b/src/app/services/page.tsx @@ -16,7 +16,7 @@ export default async function ServicesIndexRoute({ searchParams }: { searchParam readFirstSearchParam(resolvedSearchParams.query) ?? "" ).trim(); - const hasSubmittedSearch = resolvedSearchParams.run === "1" && query.length > 0; + const hasSubmittedSearch = readFirstSearchParam(resolvedSearchParams.run) === "1" && query.length > 0; if (!hasSubmittedSearch) { return ; diff --git a/src/components/clinical-dashboard/favourites-command-library-page.tsx b/src/components/clinical-dashboard/favourites-command-library-page.tsx index 98cfb3b0e..cb6593489 100644 --- a/src/components/clinical-dashboard/favourites-command-library-page.tsx +++ b/src/components/clinical-dashboard/favourites-command-library-page.tsx @@ -143,7 +143,10 @@ function isSourceBacked(item: FavouriteItem): boolean { } function toCommandItem(item: PrototypeFavouriteItem): FavouriteItem { - const type = typeByPrototypeType[item.type] ?? (item.primaryAction === "Run" ? "Saved search" : "Source"); + const type = + item.type === "sources" && item.primaryAction === "Run" + ? "Saved search" + : (typeByPrototypeType[item.type] ?? "Source"); return { id: item.id, title: item.title, @@ -544,9 +547,11 @@ function FavouritesTable({